From 352b6406addbf2d892e51d7a4f205f3504d02d96 Mon Sep 17 00:00:00 2001 From: Tobias Bosch Date: Thu, 13 Nov 2014 15:14:57 -0800 Subject: [PATCH] fix(BaseException): Support stack traces in BaseException --- modules/facade/src/lang.es6 | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/modules/facade/src/lang.es6 b/modules/facade/src/lang.es6 index df14cf87a2..9872c3f35e 100644 --- a/modules/facade/src/lang.es6 +++ b/modules/facade/src/lang.es6 @@ -172,15 +172,8 @@ export class FunctionWrapper { } } -export class BaseException extends Error { - constructor(message){ - this.message = message; - } - - toString():String { - return this.message; - } -} +// No subclass so that we preserve error stack. +export var BaseException = Error; // JS has NaN !== NaN export function looseIdentical(a, b):boolean {