diff options
Diffstat (limited to 'js/src/Ice/browser/Debug.js')
-rw-r--r-- | js/src/Ice/browser/Debug.js | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/js/src/Ice/browser/Debug.js b/js/src/Ice/browser/Debug.js index 8b561e0c548..abb8a59287c 100644 --- a/js/src/Ice/browser/Debug.js +++ b/js/src/Ice/browser/Debug.js @@ -7,22 +7,23 @@ // // ********************************************************************** -var Ice = require("../Ice/ModuleRegistry").Ice; +const Ice = require("../Ice/ModuleRegistry").Ice; Ice.__M.require(module, ["../Ice/Class", "../Ice/Exception"]); -Ice.AssertionFailedException = Ice.Class(Error, +class AssertionFailedException extends Error +{ + constructor(message) { - __init__: function(message) - { - Error.call(this); - Ice.Exception.captureStackTrace(this); - this.message = message; - } - }); + super(); + Ice.Exception.captureStackTrace(this); + this.message = message; + } +} +Ice.AssertionFailedException = AssertionFailedException; -Ice.Debug = +class Debug { - assert: function(b, msg) + static assert(b, msg) { if(!b) { @@ -31,5 +32,7 @@ Ice.Debug = throw new Ice.AssertionFailedException(msg === undefined ? "assertion failed" : msg); } } -}; +} + +Ice.Debug = Debug; module.exports.Ice = Ice; |