improve error messages (#1506)

- better inheritance of `Error` sub-classes
- mark parse error against source in CLI

closes #235
closes #348
closes #524
closes #1356
closes #1405
This commit is contained in:
Alex Lam S.L
2017-02-27 03:40:54 +08:00
committed by GitHub
parent b1c593a041
commit 872270b149
15 changed files with 133 additions and 48 deletions

View File

@@ -13,7 +13,7 @@ describe("Comment", function() {
var fail = function(e) {
return e instanceof uglify.JS_Parse_Error &&
e.message === "SyntaxError: Unexpected token: operator (>)" &&
e.message === "Unexpected token: operator (>)" &&
e.line === 2 &&
e.col === 0;
}
@@ -36,7 +36,7 @@ describe("Comment", function() {
var fail = function(e) {
return e instanceof uglify.JS_Parse_Error &&
e.message === "SyntaxError: Unexpected token: operator (>)" &&
e.message === "Unexpected token: operator (>)" &&
e.line === 5 &&
e.col === 0;
}