How can I log the error info

Posted by Ronnie_pang on Sat 01 Jun 2013 10:58 AM — 2 posts, 10,225 views.

#0
Hey guys,
The mushcleint only show the detail info of the Run-time error when it first appeared
How can I log the Run-time error to a file when it first appeared? The error info is as following(Sometimes instead of loading errors, but a function of the running script error,like variable got nil value,etc):


Run-time error
World: pang_4.0
Immediate execution
D:\software\MUSHclient\worlds\locale\Learn.lua:5: unexpected symbol near '='
stack traceback:
[C]: in function 'dofile'
[string "Command line"]:1: in main chunk
Amended on Sat 01 Jun 2013 11:24 AM by Ronnie_pang
Australia Forum Administrator #1
I don't think you can do this right now. However you can use pcall (protected call) to protect function calls and then do your own error handling.