Throw and exception in the assert.

This commit is contained in:
Jos van den Oever
2012-11-15 10:19:50 +01:00
parent f41995b48c
commit 95ef3267bb
+2 -1
View File
@@ -466,10 +466,11 @@ function BrowserRuntime(logoutput) {
*/
function assert(condition, message, callback) {
if (!condition) {
log("alert", "ASSERTION FAILED:\n"+message);
log("alert", "ASSERTION FAILED:\n" + message);
if (callback) {
callback();
}
throw message; // interrupt execution and provide a backtrace
}
}