com.perdues
Class ProcessUtils.Exception

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by com.perdues.ProcessUtils.Exception
All Implemented Interfaces:
Serializable
Enclosing class:
ProcessUtils

public static class ProcessUtils.Exception
extends RuntimeException

This Exception class reports error exit status, all standard output and error output from an external program. It is thrown in case of nonzero exit status from some of the exec methods.

See Also:
Serialized Form

Constructor Summary
ProcessUtils.Exception(int status, String stdout, String stderr)
           
 
Method Summary
 String getMessage()
           
 int getStatus()
          Returns the process exit status of the process as reported by Process.waitFor.
 String getStderr()
          Returns all output sent to the process's error output, an empty string if there was none.
 String getStdout()
          Returns all output sent to the process's standard output, an empty string if there was none.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProcessUtils.Exception

public ProcessUtils.Exception(int status,
                              String stdout,
                              String stderr)
Method Detail

getStatus

public int getStatus()
Returns the process exit status of the process as reported by Process.waitFor.


getStdout

public String getStdout()
Returns all output sent to the process's standard output, an empty string if there was none.


getStderr

public String getStderr()
Returns all output sent to the process's error output, an empty string if there was none.


getMessage

public String getMessage()
Overrides:
getMessage in class Throwable