Difference between revisions of "Thread:getError"

(Created page with "{{newin|0.9.0|090|type=function}} Retrieves the error string from the thread if it produced a error. == Function == === Synopsis === <source lang="lua"> value = Thread:getErr...")
 
m
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{newin|[[0.9.0]]|090|type=function}}
 
{{newin|[[0.9.0]]|090|type=function}}
Retrieves the error string from the thread if it produced a error.
+
Retrieves the error string from the thread if it produced an error.
 
== Function ==
 
== Function ==
 
=== Synopsis ===
 
=== Synopsis ===
 
<source lang="lua">
 
<source lang="lua">
value = Thread:getError( )
+
err = Thread:getError( )
 
</source>
 
</source>
 
=== Arguments ===
 
=== Arguments ===
 
None.
 
None.
 
=== Returns ===
 
=== Returns ===
{{param|string|value|The error message.}}
+
{{param|string|err (nil)|The error message, or nil if the Thread has not caused an error.}}
 
== See Also ==
 
== See Also ==
 
* [[parent::Thread]]
 
* [[parent::Thread]]
 +
* [[love.threaderror]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
{{#set:Description=Retrieves the error string from the thread.}}
 
{{#set:Description=Retrieves the error string from the thread.}}
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|Thread:getError}}
 
{{i18n|Thread:getError}}

Latest revision as of 00:52, 24 November 2017

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

Retrieves the error string from the thread if it produced an error.

Function

Synopsis

err = Thread:getError( )

Arguments

None.

Returns

string err (nil)
The error message, or nil if the Thread has not caused an error.

See Also

Other Languages