lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


"Maria das Dores" <mcplin@hotmail.com> writes:

> >Ok, I have the error function thing working. Is there a way to get the
> >error message or some info about the error while I am in my error
> >handler? I have looked on the top of the stack but I didn't see 
> anything
> >that looked useful.
> >
> >Any suggestions?
> 
> Yes, read the manual, section 4.9.
> 
Ok, just inspecting the error message is no problem, but what if you
want to look at the context of the error?
Function lua_printstack() from iolib.c (now liolib.c) shows how to get
detailed information about the current callstack.
This function seems very usefull for the use by custom error-handlers.

Is there a reason, why lua_printstack() is not exported?

Stephan

--------------------------------------------------------------------------
 Stephan Herrmann
 ----------------
 Technical University Berlin
 Software Engineering Research Group
 http://swt.cs.tu-berlin.de/~stephan
 phone: ++49 30 314 73174         
--------------------------------------------------------------------------