##// END OF EJS Templates
working on core/Cancellation
working on core/Cancellation

File last commit:

r0:6a5387d69bf1 default
r17:b8fc13e5c702 propose cancellat...
Show More
ActivationError.js
38 lines | 1.1 KiB | application/javascript | JavascriptLexer
/ src / js / di / ActivationError.js
cin
repository reorganized
r0 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");
}
});
});