> I'm using Lua version 5.1.5. If you cannot use debug.traceback as suggested, then copy and adapt its code: http://www.lua.org/source/5.1/ldblib.c.html#db_errorfb