Throw error on unhandled opcodes

Tue, 06 Apr 2010 14:51:25 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Tue, 06 Apr 2010 14:51:25 +0100
changeset 11
1b3267149cbd
parent 10
ce2f27fa25a4
child 12
7d748aba47ab

Throw error on unhandled opcodes

lvm.js file | annotate | diff | comparison | revisions
--- a/lvm.js	Tue Apr 06 14:51:06 2010 +0100
+++ b/lvm.js	Tue Apr 06 14:51:25 2010 +0100
@@ -235,6 +235,7 @@
 				this.callstack.pop();
 				break;
 			default:
+				throw "Unhandled opcode: "+INS_OPCODE(instruction);
 			}
 		}
 	}

mercurial