v1.19.5: Finally bit the bullet and throw JavaScript exceptions for improved CPU exception handling

This commit is contained in:
Jeff Parsons 2015-09-10 17:59:46 -07:00
commit e207cabc0a
9 changed files with 991 additions and 915 deletions

View file

@ -3370,9 +3370,12 @@ if (DEBUGGER) {
this.cOpcodes++;
}
}
catch (e) {
this.nCycles = 0;
this.cpu.setError(e.stack || e.message);
catch(exception) {
if (typeof exception != "number") {
var e = exception;
this.nCycles = 0;
this.cpu.setError(e.stack || e.message);
}
}
} while (this.cpu.opFlags & X86.OPFLAG_PREFIXES);