<pre>
Hello,
Problem :
If I parse a non valid java file with stdin the
exitcode (System.exit) is 0 !
(I use the exitcode to check if formatting has succeeded)
How to reproduce :
- Make a non-valid java file Test.java with contents :
public class Test {
(Notice the absense of '}'.)
- execute :
> java Jalopy < Test.java
- check the exitcode.
I have traced the problem down to
de/hunsicker/jalopy/parser/JavaParser.java.
If a RecognitionException is thrown in the method parse()
and the inputstate.guessting == 0 then the error is
reported on stderr. But it doesn't rethrow the Exception
(or remembers the error), so Jalopy thinks that parsing has
been completed and exits normally with exit-code 0.
Kees.
</pre>
Logged In: YES
user_id=44430
Fixed with 1.0b7.