mirror of
https://github.com/webodf/WebODF.git
synced 2026-11-30 16:47:58 +01:00
Throw and exception in the assert.
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user