Exception handling in lua

Hi All,

Is there any way to implement exception handling in lua.
Most of the script/language like javascript, c# we can cought the error using try catch block, so in lua is there any way to catch errors in code at runtime and any way to handle those…?

Please suggest… [import]uid: 154400 topic_id: 37578 reply_id: 67578[/import]

pcall() might help you:

http://pgl.yoyo.org/luai/i/pcall [import]uid: 33275 topic_id: 37578 reply_id: 145758[/import]

pcall() might help you:

http://pgl.yoyo.org/luai/i/pcall [import]uid: 33275 topic_id: 37578 reply_id: 145758[/import]