Package com.randomnoun.common
Class ProcessUtil.ProcessException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.randomnoun.common.ProcessUtil.ProcessException
- All Implemented Interfaces:
Serializable
- Enclosing class:
ProcessUtil
Encapsulates an error from executing a command through System.exec()
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionProcessException
(String command, String exitCause, int exitCode, String stdout, String stderr) Create a new executable exception -
Method Summary
Modifier and TypeMethodDescriptionint
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ProcessException
public ProcessException(String command, String exitCause, int exitCode, String stdout, String stderr) Create a new executable exception- Parameters:
command
- Command being executedexitCode
- The exit code of the programstdout
- The standard output of the programstderr
- The error output of the programhostname
- The host the command was being executed on
-
-
Method Details
-
getStdout
-
getStderr
-
getCommand
-
getExitCode
-
getExitCause
-
getMessage
- Overrides:
getMessage
in classThrowable
-