Changes

Jump to navigation Jump to search

platform.registerErrorHandler

138 bytes added, 19:30, 24 June 2012
Line 22: Line 22:     
== Example  ==
 
== Example  ==
<syntaxhighlight>platform.registerErrorHandler(function(lineNumber, errorMessage, callStack, locals) ... end)</syntaxhighlight>
+
<syntaxhighlight>errorHandler = {}
 +
 
 +
function myErrorHandler(line, errMsg, callStack, locals)
 +
    print("Error handled ! ", errMsg)
 +
    table.insert(errorHandler, {line, errMsg, callStack, locals})
 +
end
 +
 
 +
platform.registerErrorHandler(myErrorHandler)</syntaxhighlight>
    
<br />
 
<br />
    
[[Category:platform]]
 
[[Category:platform]]

Navigation menu