mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-12-21 21:29:17 +00:00
EmuHalt is squelched
nes: fixed loadState() npe
This commit is contained in:
parent
99370530f5
commit
3a08c24869
@ -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;
|
||||
},
|
||||
});
|
||||
|
@ -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
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user