Class AbnormalExitException

All Implemented Interfaces:
Serializable

public class AbnormalExitException extends ProcessExecutionException
An exception indicating that a process has exited with an abnormal status. Any additional problems will be recorded as suppressed exceptions.
See Also:
  • Constructor Details

    • AbnormalExitException

      public AbnormalExitException()
      Constructs a new AbnormalExitException instance. The message is left blank (null), and no cause is specified.
    • AbnormalExitException

      public AbnormalExitException(String msg)
      Constructs a new AbnormalExitException instance with an initial message. No cause is specified.
      Parameters:
      msg - the message
    • AbnormalExitException

      public AbnormalExitException(Throwable cause)
      Constructs a new AbnormalExitException instance with an initial cause. If a non-null cause is specified, its message is used to initialize the message of this ProcessException; otherwise the message is left blank (null).
      Parameters:
      cause - the cause
    • AbnormalExitException

      public AbnormalExitException(String msg, Throwable cause)
      Constructs a new AbnormalExitException instance with an initial message and cause.
      Parameters:
      msg - the message
      cause - 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()
      Returns true if the soft timeout elapsed before the process exited.
      Returns:
      true if 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 - true if the soft timeout elapsed before the process exited
    • hardTimeoutElapsed

      public boolean hardTimeoutElapsed()
      Returns true if the hard timeout elapsed before the process exited.
      Returns:
      true if 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 - true if the hard timeout elapsed before the process exited
    • errorOutput

      public List<String> errorOutput()
      Returns the captured error output of the process execution, if any.
      Returns:
      the captured error output of the process execution, if any
    • setErrorOutput

      public void setErrorOutput(List<String> errorOutput)
      Set the captured error output of the process execution.
      Parameters:
      errorOutput - the captured error output of the process execution
    • output

      public List<String> output()
      Returns the captured output of the process execution, if any.
      Returns:
      the captured output of the process execution, if any
    • setOutput

      public void setOutput(List<String> output)
      Set the captured output of the process execution.
      Parameters:
      output - the captured error output of the process execution
    • getMessage

      public StringBuilder getMessage(StringBuilder b)
      Description copied from class: AbstractExecutionException
      Render this exception to the given string builder.
      Overrides:
      getMessage in class ProcessExecutionException
      Parameters:
      b - the string builder (must not be null)
      Returns:
      the same string builder (not null)