##// END OF EJS Templates
Слияние с default
Слияние с default

File last commit:

r34:bf1098a8d031 di-typescript
r37:4325b0f90ccc merge di-typescript
Show More
ActivationError.ts
36 lines | 1.0 KiB | video/mp2t | TypeScriptLexer
/ src / ts / di / ActivationError.ts
cin
ported IoC container to typescript...
r34 import { ActivationContextInfo } from "./ActivationContext";
export class ActivationError {
activationStack: ActivationContextInfo[]
service: string
innerException: any
message: string
constructor(service: string, activationStack: ActivationContextInfo[], innerException) {
this.message = "Failed to activate the service";
this.activationStack = activationStack;
this.service = service;
this.innerException = innerException;
}
toString() {
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");
}
}