JS backend: report parser errors and warnings

This commit is contained in:
Alexey Tsvetkov
2014-12-15 17:07:29 +03:00
parent a9c21b97f9
commit 348a452e01
6 changed files with 125 additions and 29 deletions
@@ -15,16 +15,9 @@
*/
package com.google.gwt.dev.js;
// An unchecked wrapper exception to interop with Rhino.
class UncheckedJsParserException extends RuntimeException {
private final JsParserException parserException;
public UncheckedJsParserException(JsParserException parserException) {
this.parserException = parserException;
}
public JsParserException getParserException() {
return parserException;
}
/**
* Used only to exit parser on error
*/
public class AbortParsingException extends RuntimeException {
public AbortParsingException() {}
}
@@ -79,9 +79,6 @@ public class JsParser {
popScope();
return stmts;
}
catch (UncheckedJsParserException e) {
throw e.getParserException();
}
finally {
Context.exit();
}