Skip to content

Commit

Permalink
help idk how error handlers work
Browse files Browse the repository at this point in the history
  • Loading branch information
LarryFrosty committed Sep 7, 2024
1 parent 8117c1a commit 52febf5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions source/psychlua/HScript.hx
Original file line number Diff line number Diff line change
Expand Up @@ -476,15 +476,15 @@ class HScript extends Iris
{
this.varsToBring = varsToBring;
scriptCode = code;
parse(true);
try
{
parse(true);
returnValue = execute();
return returnValue;
}
catch(e)
{
PlayState.instance.addTextToDebug('ERROR (${this.origin}:${this.interp.posInfos()}): ${e}', FlxColor.RED);
PlayState.instance.addTextToDebug('ERROR (${this.origin}):${this.interp.posInfos().lineNumber} - ${e}', FlxColor.RED);
}
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion source/states/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -3282,7 +3282,7 @@ class PlayState extends MusicBeatState
}
catch(e:Dynamic)
{
addTextToDebug('ERROR ON LOADING ($file) - $e', FlxColor.RED);
addTextToDebug('ERROR ON LOADING ($file):${this.interp.posInfos().lineNumber} - ${e}', FlxColor.RED);
var newScript:HScript = cast (Iris.instances.get(file), HScript);
if(newScript != null)
newScript.destroy();
Expand Down

0 comments on commit 52febf5

Please sign in to comment.