You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by John Sisson <jr...@gmail.com> on 2005/11/24 03:55:11 UTC

System.exit(int) codes used by org.apache.geronimo.system.main.Daemon

Currently in error situations the Daemon code uses exit code values of 1 
- 7 (basically a different number is used whenever an exception or error 
is detected in different parts of the code.

The deploy tool just uses exit code 1 in error situations.

I am thinking the Daemon should also just use an exit code of 1 to 
indicate an error to be consistent.

I can see a bit of uglyness in the future adding extra error checking to 
the Daemon will require finding the next available (unused) exit code.  
Currently the exit codes are in order from the top of the program to the 
bottom, but this won't be the case in the future once we start inserting 
code.

In the future, users may also argue a precedent has been set (using a 
number of exit codes) and they now want us to start translating certain 
exceptions into specific exit codes.  Do we really want to head down 
this path?

If it is decided that we should keep the exit codes, then we should at 
least document them.

Thoughts?

John

Re: System.exit(int) codes used by org.apache.geronimo.system.main.Daemon

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
Either approach (changing or documenting) sounds find to me.

Thanks,
    Aaron

On 11/23/05, John Sisson <jr...@gmail.com> wrote:
> Currently in error situations the Daemon code uses exit code values of 1
> - 7 (basically a different number is used whenever an exception or error
> is detected in different parts of the code.
>
> The deploy tool just uses exit code 1 in error situations.
>
> I am thinking the Daemon should also just use an exit code of 1 to
> indicate an error to be consistent.
>
> I can see a bit of uglyness in the future adding extra error checking to
> the Daemon will require finding the next available (unused) exit code.
> Currently the exit codes are in order from the top of the program to the
> bottom, but this won't be the case in the future once we start inserting
> code.
>
> In the future, users may also argue a precedent has been set (using a
> number of exit codes) and they now want us to start translating certain
> exceptions into specific exit codes.  Do we really want to head down
> this path?
>
> If it is decided that we should keep the exit codes, then we should at
> least document them.
>
> Thoughts?
>
> John
>