Debugging support #7
@ -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);
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user