From d57404bf02cb362a6942766c694c8839361cbac4 Mon Sep 17 00:00:00 2001 From: TudbuT Date: Sun, 6 Mar 2022 15:37:19 +0100 Subject: [PATCH] better trycatch, more debugging --- bootstrap/ISBPL.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/bootstrap/ISBPL.java b/bootstrap/ISBPL.java index 83827ba..d06ffdd 100644 --- a/bootstrap/ISBPL.java +++ b/bootstrap/ISBPL.java @@ -13,7 +13,7 @@ import java.util.concurrent.atomic.AtomicInteger; */ public class ISBPL { - private static boolean debug = false; + static boolean debug = false; public ISBPLDebugger.IPC debuggerIPC = new ISBPLDebugger.IPC(); ArrayList types = new ArrayList<>(); Stack> functionStack = new Stack<>(); @@ -97,8 +97,8 @@ public class ISBPL { block.call(file); } catch (ISBPLError error) { if (Arrays.asList(allowed).contains(error.type) || allowed.length != 1 && allowed[0].equals("all")) { - stack.push(toISBPLString(error.type)); stack.push(toISBPLString(error.message)); + stack.push(toISBPLString(error.type)); catcher.call(file); } else { @@ -1293,6 +1293,12 @@ class ISBPLDebugger extends Thread { } } break; + case "son": + ISBPL.debug = true; + break; + case "soff": + ISBPL.debug = false; + break; case "exit": System.exit(255); break;