X Tutup
Skip to content

Commit 56245c6

Browse files
committed
feat(lang): added originalException and originalStack to BaseException
1 parent ab3f236 commit 56245c6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

modules/angular2/src/facade/lang.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,10 @@ class FunctionWrapper {
176176

177177
class BaseException extends Error {
178178
final String message;
179+
final originalException;
180+
final originalStack;
179181

180-
BaseException([this.message]);
182+
BaseException([this.message, this.originalException, this.originalStack]);
181183

182184
String toString() {
183185
return this.message;

modules/angular2/src/facade/lang.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ export var Type = Function;
66
export type Type = new (...args: any[]) => any;
77

88
export class BaseException extends Error {
9-
message;
109
stack;
11-
constructor(message?: string) {
10+
constructor(public message?: string, public originalException?, public originalStack?) {
1211
super(message);
13-
this.message = message;
1412
this.stack = (<any>new Error(message)).stack;
1513
}
1614

0 commit comments

Comments
 (0)
X Tutup