lua-users home
lua-l archive

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

How are people dealing with error handling in C++?  setjmp doesn't
get along with C++ destructors.  luaconf.h has an alternate to use
exceptions, but enabling exceptions bloats binaries massively (in
VC, and even more in g++).  Anyone found a good approach?

In principle, I could move my Lua code into separate source files,
enable exceptions for just those files, and make sure to catch all
exceptions there.  That would be a major hassle--dozens of bound
classes, with Lua binding code at the end of each source file being
bound, several build systems, and also a fair bit of inline Lua
interfacing.  (I also know no way to convince automake to send
different compiler flags to different source files, short of building
a library.)  I'd sooner live with a memory leak on error than deal
with that.

Glenn Maynard