mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-12-22 12:30:01 +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) {
|
beforeSend(event, hint) {
|
||||||
const error = hint.originalException;
|
const error = hint.originalException;
|
||||||
if (error && error.hasOwnProperty('$loc')) return null; // ignore EmuHalt
|
if (error && error.hasOwnProperty('$loc')) return null; // ignore EmuHalt
|
||||||
|
if (error && error.squelchError) return null; // ignore EmuHalt
|
||||||
return event;
|
return event;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -4,8 +4,9 @@ export _8BITWS_SERVER_ROOT=/app
|
|||||||
|
|
||||||
cd "$_8BITWS_SERVER_ROOT"
|
cd "$_8BITWS_SERVER_ROOT"
|
||||||
|
|
||||||
|
curl -O https://sehugg.github.io/8bitworkshop/gen/server/server.js
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
curl -O https://sehugg.github.io/8bitworkshop/gen/server/server.js
|
|
||||||
|
|
||||||
node server.js
|
node server.js
|
||||||
|
|
||||||
|
@ -270,7 +270,7 @@ export abstract class BaseDebugPlatform extends BasePlatform {
|
|||||||
this.onBreakpointHit = callback;
|
this.onBreakpointHit = callback;
|
||||||
}
|
}
|
||||||
clearDebug() {
|
clearDebug() {
|
||||||
if (this.debugBreakState != null) {
|
if (this.debugBreakState != null && this.debugSavedState != null) {
|
||||||
this.loadState(this.debugSavedState);
|
this.loadState(this.debugSavedState);
|
||||||
}
|
}
|
||||||
this.debugSavedState = null;
|
this.debugSavedState = null;
|
||||||
|
@ -224,6 +224,7 @@ export class RAM {
|
|||||||
|
|
||||||
export class EmuHalt extends Error {
|
export class EmuHalt extends Error {
|
||||||
$loc : SourceLocation;
|
$loc : SourceLocation;
|
||||||
|
squelchError = true;
|
||||||
constructor(msg: string, loc?: SourceLocation) {
|
constructor(msg: string, loc?: SourceLocation) {
|
||||||
super(msg);
|
super(msg);
|
||||||
this.$loc = loc;
|
this.$loc = loc;
|
||||||
|
@ -175,3 +175,12 @@ describe('Tokenizer', function () {
|
|||||||
'ident ident code-fragment ident eof');
|
'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