Debugging support #7

Merged
TopchetoEU merged 7 commits from TopcehtoEU/debugging into master 2023-10-28 14:11:55 +00:00
2 changed files with 6 additions and 6 deletions
Showing only changes of commit d2d9fa9738 - Show all commits

View File

@ -53,6 +53,11 @@ public class Main {
public void error(RuntimeException err) {
Values.printError(err, null);
}
@Override
public void finish() {
task.interrupt();
}
};
public static void main(String args[]) {
@ -96,7 +101,7 @@ public class Main {
catch (EngineException e) { Values.printError(e, ""); }
}
}
catch (InterruptException e) { return; }
catch (IOException e) { return; }
catch (SyntaxException ex) {
if (exited[0]) return;
System.out.println("Syntax error:" + ex.msg);

View File

@ -7,7 +7,6 @@ import me.topchetoeu.jscript.compilation.Instruction;
import me.topchetoeu.jscript.engine.values.FunctionValue;
import me.topchetoeu.jscript.events.Awaitable;
import me.topchetoeu.jscript.events.DataNotifier;
import me.topchetoeu.jscript.exceptions.EngineException;
import me.topchetoeu.jscript.exceptions.InterruptException;
public class Engine {
@ -58,12 +57,8 @@ public class Engine {
try {
task.notifier.next(task.func.call(task.ctx, task.thisArg, task.args));
}
catch (EngineException e) {
task.notifier.error(e);
}
catch (RuntimeException e) {
task.notifier.error(e);
e.printStackTrace();
}
}
private void run() {