feat(lang): added originalException and originalStack to BaseException
This commit is contained in:
parent
ab3f2365fd
commit
56245c6aa2
@ -176,8 +176,10 @@ class FunctionWrapper {
|
|||||||
|
|
||||||
class BaseException extends Error {
|
class BaseException extends Error {
|
||||||
final String message;
|
final String message;
|
||||||
|
final originalException;
|
||||||
|
final originalStack;
|
||||||
|
|
||||||
BaseException([this.message]);
|
BaseException([this.message, this.originalException, this.originalStack]);
|
||||||
|
|
||||||
String toString() {
|
String toString() {
|
||||||
return this.message;
|
return this.message;
|
||||||
|
@ -6,11 +6,9 @@ export var Type = Function;
|
|||||||
export type Type = new (...args: any[]) => any;
|
export type Type = new (...args: any[]) => any;
|
||||||
|
|
||||||
export class BaseException extends Error {
|
export class BaseException extends Error {
|
||||||
message;
|
|
||||||
stack;
|
stack;
|
||||||
constructor(message?: string) {
|
constructor(public message?: string, public originalException?, public originalStack?) {
|
||||||
super(message);
|
super(message);
|
||||||
this.message = message;
|
|
||||||
this.stack = (<any>new Error(message)).stack;
|
this.stack = (<any>new Error(message)).stack;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user