Menu

#59 Problem with exitcode

closed
None
1
2002-07-28
2002-05-26
Kees Kuip
No

<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>

Discussion

  • Marco Hunsicker

    Marco Hunsicker - 2002-05-27
    • status: open --> closed
     
  • Marco Hunsicker

    Marco Hunsicker - 2002-05-27
    • assigned_to: nobody --> marcohu
     
  • Marco Hunsicker

    Marco Hunsicker - 2002-05-27

    Logged In: YES
    user_id=44430

    Fixed with 1.0b7.

     
  • Marco Hunsicker

    Marco Hunsicker - 2002-07-28
    • priority: 5 --> 1
     

Log in to post a comment.