Changes

Jump to navigation Jump to search

platform.registerErrorHandler

1,002 bytes added, 23:43, 6 June 2012
Created page with "platform.'''registerErrorHandler''' is a function that is part of the platform. This function sets the error handler callback function for the script. Se..."
platform.'''registerErrorHandler''' is a function that is part of the [[:Category:platform|platform]].


This function sets the error handler callback function for the script. Setting an error handler callback function provides control over what happens when an error is encountered in the script. Returning a true value quietly kills the script and prevents any error reporting to the gui.
<br />

The error handler callback function will not be called for errors that occur during initialization or within on.restore.

<br />

{{Since|3.2}}

== Syntax ==
platform.'''registerErrorHandler'''(function(lineNumber, errorMessage, callStack, locals) ... end)

{| class="wikitable"
|-
! Parameter !! Type !! Description
|-
| <u><center>function....</center></u> || function || error handler callback function
|}

== Example ==
<syntaxhighlight>platform.registerErrorHandler(function(lineNumber, errorMessage, callStack, locals) ... end)</syntaxhighlight>

<br />

[[Category:platform]]

Navigation menu