From 4c0461cab600181a9167072dc4d9db5c228e2242 Mon Sep 17 00:00:00 2001 From: Andreas Kirsch Date: Tue, 12 May 2015 19:58:47 +0200 Subject: [PATCH] feat(parser): include the expression that caused an exception during evaluation in the unwrapped error message This greatly improves debugging of angular.dart apps because it makes it much easier to find the expression that triggered an exception in the actual source code. --- lib/core/parser/parser.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/core/parser/parser.dart b/lib/core/parser/parser.dart index e86a503cd..da9c30e23 100644 --- a/lib/core/parser/parser.dart +++ b/lib/core/parser/parser.dart @@ -117,6 +117,8 @@ class _UnwrapExceptionDecorator extends Expression { return _expression.eval(scope, formatters); } on EvalError catch (e, s) { throw e.unwrap("$this", s); + } catch (e, s) { + throw new EvalError(e.toString()).unwrap("$this", s); } }