[EMAIL PROTECTED] wrote: > I've got a locally changed version of App that uses negative return codes > and has a set of them to match different failure conditions: > > /** return code for ok processing */ > private static final int RC_OK = 0; > /** return code from command prompt when a bad argument is passed */ > private static final int RC_BAD_ARG = -10; > /** return code from command prompt when initialization fails */ > private static final int RC_INIT_ERROR = -20; > /** return code from command prompt when a goal isn't found */ > private static final int RC_NO_GOAL = -30; > /** return code for bad repository configuration */ > private static final int RC_BAD_REPO = -40; > /** return code for a goal with no actions */ > private static final int RC_EMPTY_GOAL = -50; > /** return code for a goal that failed */ > private static final int RC_GOAL_FAILED = -60; > /** return code for a goal failed from jelly exception being thrown */ > private static final int RC_JELLY_FAILED = -70; > /** return code for a failure due to Jelly issues */ > private static final int RC_BAD_JELLY = -80; > /** return code for a failure due to anything else */ > private static final int RC_OTHER_FAILURE = -90; > > Votes?
I'd suggest using positive numbers instead. Unix(like) shells treat return codes as unsigned bytes, so one would have to convert the values above to use them for comparison in a script. For example -10 -> 246, -20 -> 236 etc. Make them positive and save people the hassle. Rafal -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
