WoW:Getting more useful errors

From AddOn Studio
Revision as of 04:52, 28 August 2006 by WoWWiki>Amehzing (Quick and easy way to get more useful errors)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Add the following function to your Addon's LUA file:

function ErrorWithStack(msg)
   msg = msg.."\n"..debugstack()
   _ERRORMESSAGE(msg)
end

Add the following line to your Addon's Init function:

seterrorhandler(ErrorWithStack)

You're done :-).