##// END OF EJS Templates
sync
sync

File last commit:

r15:3985e8405319 tip default
r15:3985e8405319 tip default
Show More
ActivationError.ts
57 lines | 1.5 KiB | video/mp2t | TypeScriptLexer
/ src / main / ts / ActivationError.ts
cin
initial commit
r0 export interface ActivationItem {
name: string;
cin
sync
r15 descriptor: string;
cin
initial commit
r0 }
cin
almost woking typings
r9 /**
* Contains information about the error which occurred during service activation.
*
* Information about activation error includes original exception which has
* occurred, the name of the service being activated and activation stack of
* services.
*/
cin
initial commit
r0 export class ActivationError {
cin
almost woking typings
r9 /**
* Stack of services being activating
*/
cin
Removed ContextResolver, added DescriptoBuilder.wants(...), dependencies are declared statically
r4 readonly activationStack: ActivationItem[];
cin
initial commit
r0
cin
almost woking typings
r9 /**
* The exception which occurred during activation of the service
*/
cin
Removed ContextResolver, added DescriptoBuilder.wants(...), dependencies are declared statically
r4 readonly innerException: unknown;
cin
initial commit
r0
cin
almost woking typings
r9 /**
* Error message
*/
cin
Removed ContextResolver, added DescriptoBuilder.wants(...), dependencies are declared statically
r4 readonly message: string;
cin
initial commit
r0
cin
sync
r15 constructor(message: string, activationStack: ActivationItem[], innerException?: unknown) {
this.message = message;
cin
initial commit
r0 this.activationStack = activationStack;
this.innerException = innerException;
}
toString() {
const parts = [this.message];
cin
sync
r15
if (this.activationStack && this.activationStack.length) {
const [{ name, descriptor }, ...before] = this.activationStack;
parts.push(`when activating: ${name}, ${descriptor}`);
if (before) {
parts.push("at");
parts.push.apply(
null,
before.map(({ name: name, descriptor: service }) => ` ${name} ${service}`)
);
}
}
cin
initial commit
r0
if (this.innerException)
cin
working on fluent configuration
r1 parts.push(`caused by: ${String(this.innerException)}`);
cin
initial commit
r0
return parts.join("\n");
}
}