return Error from minify() (#1880)

Have `minify()` return `Error` in `result.error` rather than throwing it.
This commit is contained in:
Alex Lam S.L
2017-05-08 07:05:19 +08:00
committed by GitHub
parent da295de82b
commit a3b2eb75bd
3 changed files with 28 additions and 25 deletions

View File

@@ -146,6 +146,8 @@ function minify(files, options) {
result.warnings = warnings;
}
return result;
} catch (ex) {
return { error: ex };
} finally {
AST_Node.warn_function = warn_function;
}