Difference between revisions of "love.threaderror"
m |
m (→Example) |
||
Line 13: | Line 13: | ||
== Example == | == Example == | ||
<source lang="lua"> | <source lang="lua"> | ||
+ | function love.load() | ||
+ | mythread = love.thread.newThread("thread.lua") | ||
+ | mythread:start() | ||
+ | end | ||
+ | |||
function love.threaderror(thread, errorstr) | function love.threaderror(thread, errorstr) | ||
print("Thread error!\n"..errorstr) | print("Thread error!\n"..errorstr) | ||
+ | -- thread:getError() will return the same error string now. | ||
end | end | ||
</source> | </source> | ||
+ | |||
== See Also == | == See Also == | ||
* [[parent::love]] | * [[parent::love]] |
Revision as of 18:51, 28 November 2013
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
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
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info