love.threaderror

love.threaderror

Available since LÖVE 0.9.0
This callback is not supported in earlier versions.

Callback function triggered when a Thread encounters an error.

Function

Synopsis

love.threaderror( thread, errorstr )

Arguments

Thread thread
The thread which produced the error.
string errorstr
The error message.

Returns

Nothing.

Example

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

See Also


© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/love.threaderror

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部