WoW API: seterrorhandler

From AddOn Studio
Revision as of 04:47, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page API seterrorhandler to API seterrorhandler without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WoW API < seterrorhandler

Sets the function to be called when WoW encounters an error.

seterrorhandler(errFunction)

Arguments

errFunction
Function - The function to call when an error occurs. The function is passed a single argument containing the error message.

Example

If you wanted to print all errors to your chat frame, you could do:

seterrorhandler(print);

Alternatively, the following would also perform the same task:

seterrorhandler(function(msg)
 print(msg);
end);