Skip to content

Commit

Permalink
Emmet: Show error when failed to eval math expression Fixes #31281
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-rao-a committed Jul 31, 2017
1 parent 24d905a commit da83dff
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions extensions/emmet/src/evaluateMathExpression.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export function evaluateMathExpression() {
const result = String(evaluate(stream, true));
editBuilder.replace(new vscode.Range(stream.pos, pos), result);
} catch (err) {
vscode.window.showErrorMessage('Could not evaluate expression');
// Ignore error since most likely it’s because of non-math expression
console.warn('Math evaluation error', err);
}
Expand Down

0 comments on commit da83dff

Please sign in to comment.