Skip to content

Commit 4b6ee82

Browse files
committed
Fix error
1 parent 36fa651 commit 4b6ee82

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎Distribution/LuaBridge/LuaBridge.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9199,7 +9199,8 @@ inline int try_overload_functions(lua_State* L)
91999199
}
92009200
lua_concat(L, nerrors * 2 + 1);
92019201

9202-
lua_error_x(L);
9202+
const char* message = lua_tostring(L, -1);
9203+
raise_lua_error(L, "%s", message ? message : "");
92039204
}
92049205

92059206
inline void push_function(lua_State* L, lua_CFunction fp, const char* debugname)

‎Source/LuaBridge/detail/CFunctions.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2122,7 +2122,8 @@ inline int try_overload_functions(lua_State* L)
21222122
}
21232123
lua_concat(L, nerrors * 2 + 1);
21242124

2125-
lua_error_x(L);
2125+
const char* message = lua_tostring(L, -1);
2126+
raise_lua_error(L, "%s", message ? message : "");
21262127
}
21272128

21282129
//=================================================================================================

0 commit comments

Comments
 (0)