[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: What is the equivalent of die() command of perl
- From: pan shizhu <pan.shizhu@...>
- Date: Fri, 11 Sep 2009 13:27:25 +0800
You will get a stack backtrace only when you have not catch the lua
exception (use lua_pcall() in your C program to call your lua script
and all exception catched, or use pcall() in your lua program).
In fact you should always catch the lua exception in your host program
since many lua functions may call error() and you should at least
catch them in your main().
On Thu, Sep 10, 2009 at 8:00 PM, steve donovan
> Well error("message") would work, but you would also get a stack
> trace, which is not always so friendly for your users. So people will
> often do this, which gives a message and no stacktrace.