Lua compilation and exceptions
Szymon Gatner <[email protected]>
| Newsgroups | gmane.comp.lang.lua.bind.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, should Lua be built as C++ to play nicely with luabind error handling? >From http://lua-users.org/wiki/BuildingLua: "By default if lua 5.1 or later is compiled as C++, it will use C++ exceptions to unwind the stack rather than longjmp/setjmp, though this is configurable (at compile time). See luaconf.h near LUAI_THROW/LUAI_TRY for a discussion of this." I am rather confused how this fits into luabind's exception handling. For example, docs say that: "If any of the functions you register throws an exception when called, that exception will be caught by luabind and converted to an error string and lua_error() will be invoked." Since lua_error() behaves differently depending on how Lua was build (longjump in C, exceptions in C++) which is the correct way to build Lua when used with luabind? Regards, Szymon Gatner ------------------------------------------------------------------------------ What You Don't Know About Data Connectivity CAN Hurt You This paper provides an overview of data connectivity, details its effect on application quality, and explores various alternative solutions. http://p.sf.net/sfu/progress-d2d