java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.smallrye.common.process.AbstractExecutionException
io.smallrye.common.process.ProcessExecutionException
io.smallrye.common.process.AbnormalExitException
- All Implemented Interfaces:
Serializable
An exception indicating that a process has exited with an abnormal status.
Any additional problems will be recorded as suppressed exceptions.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newAbnormalExitExceptioninstance.Constructs a newAbnormalExitExceptioninstance with an initial message.AbnormalExitException(String msg, Throwable cause) Constructs a newAbnormalExitExceptioninstance with an initial message and cause.AbnormalExitException(Throwable cause) Constructs a newAbnormalExitExceptioninstance with an initial cause. -
Method Summary
Modifier and TypeMethodDescriptionReturns the captured error output of the process execution, if any.intexitCode()Returns the exit code of the process.Render this exception to the given string builder.booleanReturnstrueif the hard timeout elapsed before the process exited.output()Returns the captured output of the process execution, if any.voidsetErrorOutput(List<String> errorOutput) Set the captured error output of the process execution.voidsetExitCode(int exitCode) Set the exit code of the process.voidsetHardTimeoutElapsed(boolean hardTimeoutElapsed) Set whether the hard timeout elapsed before the process exited.voidSet the captured output of the process execution.voidsetSoftTimeoutElapsed(boolean softTimeoutElapsed) Set whether the soft timeout elapsed before the process exited.booleanReturnstrueif the soft timeout elapsed before the process exited.Methods inherited from class io.smallrye.common.process.ProcessExecutionException
arguments, command, pid, setArguments, setCommand, setPid, setShowCommand, showCommandMethods inherited from class io.smallrye.common.process.AbstractExecutionException
getMessageMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
AbnormalExitException
public AbnormalExitException()Constructs a newAbnormalExitExceptioninstance. The message is left blank (null), and no cause is specified. -
AbnormalExitException
Constructs a newAbnormalExitExceptioninstance with an initial message. No cause is specified.- Parameters:
msg- the message
-
AbnormalExitException
Constructs a newAbnormalExitExceptioninstance with an initial cause. If a non-nullcause is specified, its message is used to initialize the message of thisProcessException; otherwise the message is left blank (null).- Parameters:
cause- the cause
-
AbnormalExitException
Constructs a newAbnormalExitExceptioninstance with an initial message and cause.- Parameters:
msg- the messagecause- the cause
-
-
Method Details
-
exitCode
public int exitCode()Returns the exit code of the process.- Returns:
- the exit code of the process
-
setExitCode
public void setExitCode(int exitCode) Set the exit code of the process.- Parameters:
exitCode- the exit code
-
softTimeoutElapsed
public boolean softTimeoutElapsed()Returnstrueif the soft timeout elapsed before the process exited.- Returns:
trueif the soft timeout elapsed before the process exited
-
setSoftTimeoutElapsed
public void setSoftTimeoutElapsed(boolean softTimeoutElapsed) Set whether the soft timeout elapsed before the process exited.- Parameters:
softTimeoutElapsed-trueif the soft timeout elapsed before the process exited
-
hardTimeoutElapsed
public boolean hardTimeoutElapsed()Returnstrueif the hard timeout elapsed before the process exited.- Returns:
trueif the hard timeout elapsed before the process exited
-
setHardTimeoutElapsed
public void setHardTimeoutElapsed(boolean hardTimeoutElapsed) Set whether the hard timeout elapsed before the process exited.- Parameters:
hardTimeoutElapsed-trueif the hard timeout elapsed before the process exited
-
errorOutput
Returns the captured error output of the process execution, if any.- Returns:
- the captured error output of the process execution, if any
-
setErrorOutput
Set the captured error output of the process execution.- Parameters:
errorOutput- the captured error output of the process execution
-
output
Returns the captured output of the process execution, if any.- Returns:
- the captured output of the process execution, if any
-
setOutput
Set the captured output of the process execution.- Parameters:
output- the captured error output of the process execution
-
getMessage
Description copied from class:AbstractExecutionExceptionRender this exception to the given string builder.- Overrides:
getMessagein classProcessExecutionException- Parameters:
b- the string builder (must not benull)- Returns:
- the same string builder (not
null)
-