[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:14:04 +0000
On Tue, Mar 12, 2002 at 10:06:43AM -0300, Luiz Henrique de Figueiredo wrote:
> >After some searching, I have also succeeded in installing a custom
> >error handler function, but I do not succeed in finding out how to
> >obtain the line number of the error for which the function gets called.
>
> If your error handler is in Lua, try something like this:
>
> function _ERRORMESSAGE(s)
> print(s)
> local a=getinfo(2)
> print(a.short_src,a.currentline,a.name)
> end
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?
--
Rob Kendrick - http://www.digital-scurf.org/
You will be held hostage by a radical group.