lua-users home
lua-l archive

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


Look at xpcall.

http://www.lua.org/manual/5.1/manual.html#pdf-xpcall

http://www.lua.org/pil/8.5.html


-----Original Message-----
From: lua-bounces@bazar2.conectiva.com.br
[mailto:lua-bounces@bazar2.conectiva.com.br] On Behalf Of Robert Hibberdine
Sent: 10 May 2006 09:51
To: Lua list
Subject: Error handling

Hi all,

I am writing my first large lua script to run on an embedded system and 
need to handle errors in my own way. I have just discovered 'pcall'...

My question is:
How do I print the function name and line number where the error 
occurred in my own error handler?

TIA

Bob