diff options
-rw-r--r-- | ext/console/01_console.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/console/01_console.js b/ext/console/01_console.js index 32d8d653c..785d7ffe6 100644 --- a/ext/console/01_console.js +++ b/ext/console/01_console.js @@ -172,6 +172,13 @@ function getStderrNoColor() { return noColorStderr(); } +class AssertionError extends Error { + name = "AssertionError"; + constructor(message) { + super(message); + } +} + function assert(cond, msg = "Assertion failed.") { if (!cond) { throw new AssertionError(msg); |