Skip to content

Commit

Permalink
feat(lang): added originalException and originalStack to BaseException
Browse files Browse the repository at this point in the history
  • Loading branch information
vsavkin committed Jun 29, 2015
1 parent ab3f236 commit 56245c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 3 additions & 1 deletion modules/angular2/src/facade/lang.dart
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,10 @@ class FunctionWrapper {

class BaseException extends Error {
final String message;
final originalException;
final originalStack;

BaseException([this.message]);
BaseException([this.message, this.originalException, this.originalStack]);

String toString() {
return this.message;
Expand Down
4 changes: 1 addition & 3 deletions modules/angular2/src/facade/lang.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ export var Type = Function;
export type Type = new (...args: any[]) => any;

export class BaseException extends Error {
message;
stack;
constructor(message?: string) {
constructor(public message?: string, public originalException?, public originalStack?) {
super(message);
this.message = message;
this.stack = (<any>new Error(message)).stack;
}

Expand Down

0 comments on commit 56245c6

Please sign in to comment.