com.perdues
Class ProcessUtils.Exception
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
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
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. |
ProcessUtils.Exception
public ProcessUtils.Exception(int status,
String stdout,
String stderr)
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