// Path: centipede-parser/src/main/java/com/ontology2/centipede/errors/ExitCodeException.java
// public class ExitCodeException extends Exception {
//     final int status;
//     
//     //
//     // want to leave the option of converting to a subclass if desired,  to
//     // implement finer-grained exception types such as one would see in a
//     // POSIX sysexits.h
//     //
//     // http://www.opensource.apple.com/source/Libc/Libc-320/include/sysexits.h
//     //
//     
//     public static ExitCodeException create(int status) {
//         return new ExitCodeException(status);
//     }
// 
//     protected ExitCodeException(int status) {
//         super("process exit code "+status);
//         
//         if (status<1 || status>255) {
//             throw new IllegalArgumentException();
//         }
//         
//         this.status=status;
//     }
//     
//     public int getStatus() {
//         return status;
//     }
//     
// 
//     public static int EX_USAGE=64;  /* command line usage error */
//     public static int EX_DATAERR=65;  /* data format error */
//     public static int EX_NOINPUT=66;  /* cannot open input */
//     public static int EX_NOUSER=67;  /* addressee unknown */
//     public static int EX_NOHOST=68;  /* host name unknown */
//                     
//     public static int EX_UNAVAILABLE=69;  /* service unavailable */
//     public static int EX_SOFTWARE=70;  /* internal software error */
//     public static int EX_OSERR=71;  /* system error (e.g., can't fork) */
//     public static int EX_OSFILE=72;  /* critical OS file missing */
//     public static int EX_CANTCREAT=73;  /* can't create (user) output file */
//     public static int EX_IOERR=74;  /* input/output error */
//     public static int EX_TEMPFAIL=75;  /* temp failure; user is invited to retry */
//     public static int EX_PROTOCOL=76;  /* remote error in protocol */
//     public static int EX_NOPERM=77;  /* permission denied */
//     public static int EX_CONFIG=78;  /* configuration error */
//     
// }
// 
// Path: centipede-parser/src/main/java/com/ontology2/centipede/errors/ShutTheProcessDown.java
// public class ShutTheProcessDown extends RuntimeException {
// 
//     public ShutTheProcessDown() {
//         super("process shutdown requested");
//     }
//     
// }


import com.ontology2.centipede.errors.ExitCodeException;
import com.ontology2.centipede.errors.ShutTheProcessDown;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

package com.ontology2.centipede.shell;


public abstract class CommandLineApplication extends ResourceAwareObject {
    private static Log logger = LogFactory.getLog(CommandLineApplication.class);

    public void run(String[] arguments) {
        try {
            _run(arguments);

// Path: centipede-parser/src/main/java/com/ontology2/centipede/errors/ExitCodeException.java
// public class ExitCodeException extends Exception {
//     final int status;
//     
//     //
//     // want to leave the option of converting to a subclass if desired,  to
//     // implement finer-grained exception types such as one would see in a
//     // POSIX sysexits.h
//     //
//     // http://www.opensource.apple.com/source/Libc/Libc-320/include/sysexits.h
//     //
//     
//     public static ExitCodeException create(int status) {
//         return new ExitCodeException(status);
//     }
// 
//     protected ExitCodeException(int status) {
//         super("process exit code "+status);
//         
//         if (status<1 || status>255) {
//             throw new IllegalArgumentException();
//         }
//         
//         this.status=status;
//     }
//     
//     public int getStatus() {
//         return status;
//     }
//     
// 
//     public static int EX_USAGE=64;  /* command line usage error */
//     public static int EX_DATAERR=65;  /* data format error */
//     public static int EX_NOINPUT=66;  /* cannot open input */
//     public static int EX_NOUSER=67;  /* addressee unknown */
//     public static int EX_NOHOST=68;  /* host name unknown */
//                     
//     public static int EX_UNAVAILABLE=69;  /* service unavailable */
//     public static int EX_SOFTWARE=70;  /* internal software error */
//     public static int EX_OSERR=71;  /* system error (e.g., can't fork) */
//     public static int EX_OSFILE=72;  /* critical OS file missing */
//     public static int EX_CANTCREAT=73;  /* can't create (user) output file */
//     public static int EX_IOERR=74;  /* input/output error */
//     public static int EX_TEMPFAIL=75;  /* temp failure; user is invited to retry */
//     public static int EX_PROTOCOL=76;  /* remote error in protocol */
//     public static int EX_NOPERM=77;  /* permission denied */
//     public static int EX_CONFIG=78;  /* configuration error */
//     
// }
// 
// Path: centipede-parser/src/main/java/com/ontology2/centipede/errors/ShutTheProcessDown.java
// public class ShutTheProcessDown extends RuntimeException {
// 
//     public ShutTheProcessDown() {
//         super("process shutdown requested");
//     }
//     
// }


// Path: centipede/src/main/java/com/ontology2/centipede/shell/CommandLineApplication.java
import com.ontology2.centipede.errors.ExitCodeException;
import com.ontology2.centipede.errors.ShutTheProcessDown;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

package com.ontology2.centipede.shell;


public abstract class CommandLineApplication extends ResourceAwareObject {
    private static Log logger = LogFactory.getLog(CommandLineApplication.class);

    public void run(String[] arguments) {
        try {
            _run(arguments);

        } catch (ExitCodeException e) {
