finally fix handling of exceptions, pray to the Lord it works

This commit is contained in:
ThePhD 2017-11-11 18:33:56 -05:00
parent 2d31d84070
commit 6738ceedae
3 changed files with 8 additions and 8 deletions

View File

@ -20,8 +20,8 @@
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// This file was generated with a script. // This file was generated with a script.
// Generated 2017-11-11 12:41:27.450855 UTC // Generated 2017-11-11 23:29:02.509687 UTC
// This header was generated with sol v2.18.6 (revision e667e69) // This header was generated with sol v2.18.6 (revision 2d31d84)
// https://github.com/ThePhD/sol2 // https://github.com/ThePhD/sol2
#ifndef SOL_SINGLE_INCLUDE_HPP #ifndef SOL_SINGLE_INCLUDE_HPP
@ -10468,7 +10468,7 @@ namespace sol {
} }
inline void luajit_exception_off(lua_State* L) { inline void luajit_exception_off(lua_State* L) {
#ifdef SOL_LUAJIT #if defined(SOL_LUAJIT)
if (L == nullptr) { if (L == nullptr) {
return; return;
} }
@ -13546,7 +13546,7 @@ namespace sol {
stack::push(lua_state(), error); stack::push(lua_state(), error);
} }
}; };
#if defined(SOL_EXCEPTIONS_SAFE_PROPAGATION) && !defined(SOL_LUAJIT) #if !defined(SOL_EXCEPTIONS_SAFE_PROPAGATION) || defined(SOL_LUAJIT)
try { try {
#endif // Safe Exception Propagation #endif // Safe Exception Propagation
#endif // No Exceptions #endif // No Exceptions
@ -13555,7 +13555,7 @@ namespace sol {
poststacksize = lua_gettop(lua_state()) - static_cast<int>(h.valid()); poststacksize = lua_gettop(lua_state()) - static_cast<int>(h.valid());
returncount = poststacksize - (firstreturn - 1); returncount = poststacksize - (firstreturn - 1);
#ifndef SOL_NO_EXCEPTIONS #ifndef SOL_NO_EXCEPTIONS
#if defined(SOL_EXCEPTIONS_SAFE_PROPAGATION) && !defined(SOL_LUAJIT) #if !defined(SOL_EXCEPTIONS_SAFE_PROPAGATION) || defined(SOL_LUAJIT)
} }
// Handle C++ errors thrown from C++ functions bound inside of lua // Handle C++ errors thrown from C++ functions bound inside of lua
catch (const char* error) { catch (const char* error) {

View File

@ -150,7 +150,7 @@ namespace sol {
stack::push(lua_state(), error); stack::push(lua_state(), error);
} }
}; };
#if defined(SOL_EXCEPTIONS_SAFE_PROPAGATION) && !defined(SOL_LUAJIT) #if !defined(SOL_EXCEPTIONS_SAFE_PROPAGATION) || defined(SOL_LUAJIT)
try { try {
#endif // Safe Exception Propagation #endif // Safe Exception Propagation
#endif // No Exceptions #endif // No Exceptions
@ -159,7 +159,7 @@ namespace sol {
poststacksize = lua_gettop(lua_state()) - static_cast<int>(h.valid()); poststacksize = lua_gettop(lua_state()) - static_cast<int>(h.valid());
returncount = poststacksize - (firstreturn - 1); returncount = poststacksize - (firstreturn - 1);
#ifndef SOL_NO_EXCEPTIONS #ifndef SOL_NO_EXCEPTIONS
#if defined(SOL_EXCEPTIONS_SAFE_PROPAGATION) && !defined(SOL_LUAJIT) #if !defined(SOL_EXCEPTIONS_SAFE_PROPAGATION) || defined(SOL_LUAJIT)
} }
// Handle C++ errors thrown from C++ functions bound inside of lua // Handle C++ errors thrown from C++ functions bound inside of lua
catch (const char* error) { catch (const char* error) {

View File

@ -246,7 +246,7 @@ namespace sol {
} }
inline void luajit_exception_off(lua_State* L) { inline void luajit_exception_off(lua_State* L) {
#ifdef SOL_LUAJIT #if defined(SOL_LUAJIT)
if (L == nullptr) { if (L == nullptr) {
return; return;
} }