cincheo / jsweet

A Java to JavaScript transpiler.
http://www.jsweet.org
Other
1.45k stars 160 forks source link

Add an option to report Java errors #20

Closed renaudpawlak closed 8 years ago

renaudpawlak commented 8 years ago

Currently, JSweet prints out Java errors bud does not go through the actual error reporting API (see the bad looking TranspilationHandler.reportSilentError() method). This is bad for reporting compilation errors in a consistent way.

We need a solution for reporting or ignoring Java errors depending on if the reporting of Java errors is needed or not (for instance, in the Eclipse plugin, it is not needed because Eclipse will report the errors).

Possible solutions are:

The second solution is probably better... clearly more generic and flexible.

renaudpawlak commented 8 years ago

All Java errors are now reported as JSweetProblems.INTERNAL_JAVA_ERROR, so that the transpilation handler can choose how to report them.