{{newin|[[0.9.0]]|090|type=callback}}
Callback function triggered when a [[Thread]] encounters an error.
== Function ==
=== Synopsis ===
<source lang="lua">
love.threaderror( thread, errorstr )
</source>
=== Arguments ===
{{param|Thread|thread|The thread which produced the error.}}
{{param|string|errorstr|The error message.}}
=== Returns ===
Nothing.
== Example ==
<source lang="lua">
function love.load()
  mythread = love.thread.newThread("thread.lua")
  mythread:start()
end

function love.threaderror(thread, errorstr)
  print("Thread error!\n"..errorstr)
  -- thread:getError() will return the same error string now.
end
</source>

== See Also ==
* [[parent::love]]
[[Category:Callbacks]]
{{#set:Description=Callback function triggered when a [[Thread]] encounters an error.}}
{{#set:Subcategory=General}}
== Other Languages ==
{{i18n|love.threaderror}}