|
Thanks for the reply, but I'm not sure this is exactly what I'm looking for: > one way to print errors, but avoid the abortion is to use Lua's error () > function together with pcall (). pcall () catches the error and returns the > message. > Maybe the assert() function could also be helpful to you. These functions are all called from Lua, I need something that Lua will call whenever it comes across an error. > Further I found this presentation from John Belmonte about exception patterns in > Lua: > > www.lua.org/wshop06/Belmonte.pdf Thanks for the link to the presentation, it had a nice list of methods. :) Is there some sort of function That I could register in Lua or as a hook to print out every single error it comes across to the console? My application works like this: 1. It gets the file name from the start-up arguments. If one isn't listed, it uses a default file name. 2. It registers all my functions/tables to to the lua state. (HGE, EveR [ my C++ game engine that uses Box2D physics. ], and a few other things) 3. It runs the specified file. 4. It quits after the file is through running. (It doesn't have anything better to do.) Thanks, --Sgt. Sparky :) :) :) See how Windows Mobile brings your life together—at home, work, or on the go. See Now |