summaryrefslogtreecommitdiff
path: root/js/src/Ice/RetryException.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/Ice/RetryException.js')
-rw-r--r--js/src/Ice/RetryException.js23
1 files changed, 12 insertions, 11 deletions
diff --git a/js/src/Ice/RetryException.js b/js/src/Ice/RetryException.js
index de3f7fdedc9..869e162fb91 100644
--- a/js/src/Ice/RetryException.js
+++ b/js/src/Ice/RetryException.js
@@ -7,12 +7,14 @@
//
// **********************************************************************
-var Ice = require("../Ice/ModuleRegistry").Ice;
-Ice.__M.require(module, ["../Ice/Class", "../Ice/Exception", "../Ice/Debug", "../Ice/LocalException"]);
+const Ice = require("../Ice/ModuleRegistry").Ice;
+Ice.__M.require(module, ["../Ice/Debug", "../Ice/LocalException"]);
-var RetryException = Ice.Class(Error, {
- __init__: function(ex)
+class RetryException extends Error
+{
+ constructor(ex)
{
+ super();
if(ex instanceof Ice.LocalException)
{
this._ex = ex;
@@ -23,13 +25,12 @@ var RetryException = Ice.Class(Error, {
this._ex = ex._ex;
}
}
-});
-
-var prototype = RetryException.prototype;
-
-Object.defineProperty(prototype, "inner", {
- get: function() { return this._ex; }
-});
+
+ get inner()
+ {
+ return this._ex;
+ }
+}
Ice.RetryException = RetryException;
module.exports.Ice = Ice;