##// END OF EJS Templates
working on multiplaftorm support (node, browser)
working on multiplaftorm support (node, browser)

File last commit:

r41:eae7e609c38a di-typescript
r47:4a34b9d6df70 di-typescript
Show More
ActivationError.ts
36 lines | 977 B | video/mp2t | TypeScriptLexer
/ src / ts / di / ActivationError.ts
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() {
const 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(x => parts.push(` ${x.name} ${x.service}`));
}
return parts.join("\n");
}
}