diff src/implab/di/ActivationError.js @ 34:27e8e9e38e07 default tip

Слияние
author nickolay
date Wed, 05 Jun 2019 20:44:15 +0300
parents 8af8e840dd49 1dc2fd263b90
children
line wrap: on
line diff
--- a/src/implab/di/ActivationError.js	Wed Jun 05 17:44:17 2019 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-define([
-    "../declare"
-], function (declare) {
-    return declare(null, {
-        activationStack: null,
-
-        service: null,
-
-        innerException: null,
-
-        message: null,
-
-        constructor: function (service, activationStack, innerException) {
-            this.message = "Failed to activate the service";
-            this.activationStack = activationStack;
-            this.service = service;
-            this.innerException = innerException;
-        },
-
-        toString: function () {
-            var parts = [this.message];
-            if (this.service)
-                parts.push("when activating: " + this.service.toString());
-
-            if (this.innerException)
-                parts.push("caused by: " + this.innerException.toString());
-
-            if (this.activationStack) {
-                parts.push("at");
-                this.activationStack.forEach(function (x) {
-                    parts.push("    " + x.name + " " +
-                        (x.service ? x.service.toString() : ""));
-                });
-            }
-
-            return parts.join("\n");
-        }
-    });
-});
\ No newline at end of file