disable exeptions in cmake

This commit is contained in:
2026-03-18 09:30:28 +03:00
parent 2798d7de9c
commit ccbf86f781
5 changed files with 25 additions and 17 deletions

View File

@@ -97,8 +97,10 @@ public:
{
int code = lua_pcall (L, nargs, nresults, msgh);
if (code != LUABRIDGE_LUA_OK)
Throw (LuaException (L, code));
if (code != LUABRIDGE_LUA_OK) {
// Throw (LuaException (L, code));
assert(true);
}
}
//----------------------------------------------------------------------------
@@ -128,7 +130,8 @@ protected:
private:
static int throwAtPanic (lua_State* L)
{
throw LuaException (L, -1);
// throw LuaException (L, -1);
return -1;
}
};

View File

@@ -101,7 +101,8 @@ protected:
{
if (m_stackSize == 0)
{
throw std::logic_error ("Unable to continue registration");
std::cerr << ("Unable to continue registration");
assert(true);
}
}
};
@@ -1054,7 +1055,8 @@ public:
{
if (m_stackSize == 1)
{
throw std::logic_error ("endNamespace () called on global namespace");
std::cerr << ("endNamespace () called on global namespace");
assert(true);
}
assert (m_stackSize > 1);
@@ -1150,7 +1152,8 @@ public:
{
if (m_stackSize == 1)
{
throw std::logic_error ("addProperty () called on global namespace");
std::cerr << ("addProperty () called on global namespace");
assert(true);
}
assert (lua_istable (L, -1)); // Stack: namespace table (ns)

View File

@@ -33,6 +33,7 @@
#include <cassert>
#include <stdexcept>
#include <iostream>
namespace luabridge {
@@ -320,7 +321,8 @@ public:
lua_rawgetp (L, LUA_REGISTRYINDEX, ClassInfo <T>::getClassKey ());
if (!lua_istable (L, -1))
{
throw std::logic_error ("The class is not registered in LuaBridge");
std::cerr << ("The class is not registered in LuaBridge");
assert(true);
}
lua_setmetatable (L, -2);
return ud;
@@ -375,7 +377,8 @@ private:
lua_rawgetp (L, LUA_REGISTRYINDEX, key);
if (!lua_istable (L, -1))
{
throw std::logic_error ("The class is not registered in LuaBridge");
std::cerr << ("The class is not registered in LuaBridge");
assert(true);
}
lua_setmetatable (L, -2);
}