diff --git a/ext/console/01_console.js b/ext/console/01_console.js index 32d8d653c7..785d7ffe6c 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);