[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Question about error handling
- From: Rob Kendrick <rjek@...>
- Date: Tue, 12 Mar 2002 13:19:01 +0000
On Tue, Mar 12, 2002 at 10:14:22AM -0300, Luiz Henrique de Figueiredo wrote:
> >Along the same lines... is there an easy way to get a string containing the
> >stack backtrace that I think the debugging library's default error handler
> >generates from a error handler written in Lua?
>
> You can do it yourself:
>
> function _ERRORMESSAGE(s)
> print(s)
> for i=2,1000 do
> local a=getinfo(i)
> if a==nil then break end
> print(a.short_src,a.currentline,a.name)
> end
> end
I *knew* it would be something blissfully simple, and I could work it out if
I plugged my brain in. Ta!
(need more coffee.)
--
Rob Kendrick - http://www.digital-scurf.org/
You look tired.