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]] |