Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function do_error1()
- error("do_error1")
- end
- function do_error()
- do_error1()
- end
- function error_handler(o)
- print(debug.traceback(o, 2))
- end
- xpcall(do_error, error_handler)
- print("--------------")
- do_error();
- test.lua:8: do_error1
- stack traceback:
- [C]: in function 'error'
- test.lua:8: in function 'do_error1'
- test.lua:12: in function <test.lua:11>
- [C]: in function 'xpcall'
- test.lua:19: in main chunk
- [C]: ?
- --------------
- lua: test.lua:8: do_error1
- stack traceback:
- [C]: in function 'error'
- test.lua:8: in function 'do_error1'
- test.lua:12: in function 'do_error'
- test.lua:21: in main chunk
- [C]: ?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement