This commit is contained in:
saarsena@gmail.com 2026-04-24 22:59:20 -04:00
parent 85bfb30b29
commit 3edd74158b
5 changed files with 3 additions and 2 deletions

1
.gitignore vendored
View file

@ -19,6 +19,7 @@ godot-cpp/gen/
# Editor/OS noise # Editor/OS noise
.vscode/ .vscode/
.idea/ .idea/
*.code-workspace
.DS_Store .DS_Store
Thumbs.db Thumbs.db

Binary file not shown.

View file

@ -136,7 +136,7 @@ func _expect_runtime_error(source: String, expected_error: String) -> bool:
if result.ok: if result.ok:
push_error("expected runtime error, got success: " + str(result)) push_error("expected runtime error, got success: " + str(result))
return false return false
if not str(result.error).contains(expected_error) or not str(result.error).contains("[string \"<string>\"]"): if not str(result.error).contains(expected_error) or not str(result.error).contains("stack traceback"):
push_error("unexpected runtime error: " + str(result.error)) push_error("unexpected runtime error: " + str(result.error))
return false return false
return true return true

View file

@ -314,7 +314,7 @@ Dictionary OneBitLuaRuntime::call_event(const String &event_name, const Dictiona
int error_handler = function_index; int error_handler = function_index;
lua_sethook(lua, &OneBitLuaRuntime::_instruction_hook, LUA_MASKCOUNT, int(instruction_budget)); lua_sethook(lua, &OneBitLuaRuntime::_instruction_hook, LUA_MASKCOUNT, int(instruction_budget));
int status = lua_pcall(lua, 2 + int(args.size()), 0, 0); int status = lua_pcall(lua, 2 + int(args.size()), 0, error_handler);
lua_sethook(lua, nullptr, 0, 0); lua_sethook(lua, nullptr, 0, 0);
if (status != LUA_OK) { if (status != LUA_OK) {

Binary file not shown.