adsf
This commit is contained in:
parent
85bfb30b29
commit
3edd74158b
5 changed files with 3 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
BIN
.sconsign.dblite
BIN
.sconsign.dblite
Binary file not shown.
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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.
Loading…
Add table
Add a link
Reference in a new issue