[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: What is the equivalent of die() command of perl
- From: Jerome Vuarand <jerome.vuarand@...>
- Date: Thu, 10 Sep 2009 15:04:43 +0200
2009/9/10 Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>:
>> Well error("message") would work, but you would also get a stack
>> trace, which is not always so friendly for your users.
>
> You could do this:
> debug.traceback=nil
> error("message")
Also if the script is embedded in a host application and run through
lua_pcall you don't get the stack trace unless an errfunc is explictly
provided.