Mercurial > pub > ImplabJs
comparison core/src/js/di/ActivationError.js @ 34:27e8e9e38e07 default tip
Слияние
author | nickolay |
---|---|
date | Wed, 05 Jun 2019 20:44:15 +0300 |
parents | acdcdf1a8d21 |
children |
comparison
equal
deleted
inserted
replaced
33:8af8e840dd49 | 34:27e8e9e38e07 |
---|---|
1 define([ | |
2 "../declare" | |
3 ], function (declare) { | |
4 return declare(null, { | |
5 activationStack: null, | |
6 | |
7 service: null, | |
8 | |
9 innerException: null, | |
10 | |
11 message: null, | |
12 | |
13 constructor: function (service, activationStack, innerException) { | |
14 this.message = "Failed to activate the service"; | |
15 this.activationStack = activationStack; | |
16 this.service = service; | |
17 this.innerException = innerException; | |
18 }, | |
19 | |
20 toString: function () { | |
21 var parts = [this.message]; | |
22 if (this.service) | |
23 parts.push("when activating: " + this.service.toString()); | |
24 | |
25 if (this.innerException) | |
26 parts.push("caused by: " + this.innerException.toString()); | |
27 | |
28 if (this.activationStack) { | |
29 parts.push("at"); | |
30 this.activationStack.forEach(function (x) { | |
31 parts.push(" " + x.name + " " + | |
32 (x.service ? x.service.toString() : "")); | |
33 }); | |
34 } | |
35 | |
36 return parts.join("\n"); | |
37 } | |
38 }); | |
39 }); |