add exception handling to debugger

This commit is contained in:
Daniella / Tove 2022-03-06 16:34:26 +01:00
parent 0b1067f8cc
commit 7d8c9d0938

View file

@ -1217,6 +1217,7 @@ class ISBPLDebugger extends Thread {
BufferedReader reader = new BufferedReader(new InputStreamReader(s.getInputStream()));
String line;
while ((line = reader.readLine()) != null) {
try {
switch (line.split(" ")[0]) {
case "continue":
case "cont":
@ -1230,6 +1231,10 @@ class ISBPLDebugger extends Thread {
case "n":
isbpl.debuggerIPC.run = 1;
break;
case "do":
case "d":
isbpl.debuggerIPC.run = Integer.parseInt(line.split(" ")[1]);
break;
case "until":
case "u":
isbpl.debuggerIPC.until = line.split(" ")[1];
@ -1305,6 +1310,9 @@ class ISBPLDebugger extends Thread {
default:
break;
}
} catch (Exception e) {
e.printStackTrace(new PrintStream(s.getOutputStream()));
}
}
}
}