| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 1x 1x | export class Exception extends Error {
public name: string;
public stack: string;
constructor(public message: string) {
super(message);
this.name = 'Exception';
this.stack = (<any>new Error()).stack;
}
public toString() {
return `${this.name}: ${this.message}`;
}
}
export class FatalException extends Exception {
constructor(public message: string, public exitCode: number = 1) {
super(message);
}
}
|