geterrorhandler

From Warcraft Wiki
Jump to navigation Jump to search
Flavors
Links
Info
Added in 1.10.0 / 1.13.2

Returns the currently set error handler.

handler = geterrorhandler()

Returns

handler
function - The current error handler. Receives a message as an argument, normally a string that is the second return value from pcall().

Example

local myError = "Something went horribly wrong!"
geterrorhandler()(myError)