diff --git a/index.html b/index.html index 975afa06..fccd22fd 100644 --- a/index.html +++ b/index.html @@ -584,6 +584,7 @@ $( ".dropdown-submenu" ).click(function(event) { beforeSend(event, hint) { const error = hint.originalException; if (error && error.hasOwnProperty('$loc')) return null; // ignore EmuHalt + if (error && error.squelchError) return null; // ignore EmuHalt return event; }, }); diff --git a/scripts/docker/run.sh b/scripts/docker/run.sh index 72f99554..c0db3de5 100644 --- a/scripts/docker/run.sh +++ b/scripts/docker/run.sh @@ -4,8 +4,9 @@ export _8BITWS_SERVER_ROOT=/app cd "$_8BITWS_SERVER_ROOT" +curl -O https://sehugg.github.io/8bitworkshop/gen/server/server.js + while true; do - curl -O https://sehugg.github.io/8bitworkshop/gen/server/server.js node server.js diff --git a/src/common/baseplatform.ts b/src/common/baseplatform.ts index 4ac5515a..7c5db5e0 100644 --- a/src/common/baseplatform.ts +++ b/src/common/baseplatform.ts @@ -270,7 +270,7 @@ export abstract class BaseDebugPlatform extends BasePlatform { this.onBreakpointHit = callback; } clearDebug() { - if (this.debugBreakState != null) { + if (this.debugBreakState != null && this.debugSavedState != null) { this.loadState(this.debugSavedState); } this.debugSavedState = null; diff --git a/src/common/emu.ts b/src/common/emu.ts index 94b1b733..b9db4796 100644 --- a/src/common/emu.ts +++ b/src/common/emu.ts @@ -224,6 +224,7 @@ export class RAM { export class EmuHalt extends Error { $loc : SourceLocation; + squelchError = true; constructor(msg: string, loc?: SourceLocation) { super(msg); this.$loc = loc; diff --git a/src/test/testutil.ts b/src/test/testutil.ts index 2bba1e7f..d4e2b250 100644 --- a/src/test/testutil.ts +++ b/src/test/testutil.ts @@ -175,3 +175,12 @@ describe('Tokenizer', function () { 'ident ident code-fragment ident eof'); }); }); + +describe('EmuHalt', function () { + try { + throw new EmuHalt("test"); + } catch (err) { + assert.ok(err instanceof EmuHalt); + assert.ok(err.squelchError); + } +});