Skip to content

Commit f18d736

Browse files
committed
warn for errors while evaluating but ignore them
1 parent b4a1b98 commit f18d736

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

lib/Parser.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -873,9 +873,14 @@ Parser.prototype.inScope = function inScope(params, fn) {
873873
};
874874

875875
Parser.prototype.evaluateExpression = function evaluateExpression(expression) {
876-
var result = this.applyPluginsBailResult1("evaluate " + expression.type, expression);
877-
if(result !== undefined)
878-
return result;
876+
try {
877+
var result = this.applyPluginsBailResult1("evaluate " + expression.type, expression);
878+
if(result !== undefined)
879+
return result;
880+
} catch(e) {
881+
console.warn(e);
882+
// ignore error
883+
}
879884
return new BasicEvaluatedExpression().setRange(expression.range);
880885
};
881886

0 commit comments

Comments
 (0)