diff --git a/index.html b/index.html index 77f4d92f..a477cba3 100644 --- a/index.html +++ b/index.html @@ -583,7 +583,7 @@ Sentry.init({ }, beforeSend(event, hint) { const error = hint.originalException; - if (error instanceof EmuHalt) return null; // ignore EmuHalt + if (error && error.hasOwnProperty('$loc')) return null; // ignore EmuHalt return event; }, }); diff --git a/test/cli/testutil.js b/test/cli/testutil.js index 734657b2..cfa912a1 100644 --- a/test/cli/testutil.js +++ b/test/cli/testutil.js @@ -128,3 +128,11 @@ describe('string functions', function() { assert.ok(util.isProbablyBinary(null, [0xf0,0x12])); // ran out of data }); }); + +describe('EmuHalt', function() { + it('Should detect emuhalt', function() { + var e = new emu.EmuHalt(); + assert.ok(e instanceof emu.EmuHalt); + assert.ok(e.hasOwnProperty('$loc')); + }); +});