Class Die

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    TextBuiltin.TerminatedByHelpException

    public class Die
    extends java.lang.RuntimeException
    Indicates a TextBuiltin implementation has failed during execution.

    Typically the stack trace for a Die exception is not shown to the user as it may indicate a simple error condition that the end-user can fix on their own, without needing a screen of Java stack frames.

    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean aborted  
      private static long serialVersionUID  
    • Constructor Summary

      Constructors 
      Constructor Description
      Die​(boolean aborted)
      Construct a new exception reflecting the fact that the command execution has been aborted before running.
      Die​(boolean aborted, java.lang.Throwable cause)
      Construct a new exception reflecting the fact that the command execution has been aborted before running.
      Die​(java.lang.String why)
      Construct a new message explaining what has gone wrong.
      Die​(java.lang.String why, java.lang.Throwable cause)
      Construct a new message explaining what has gone wrong.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isAborted()
      Check if this exception should cause the execution to be aborted.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • aborted

        private boolean aborted
    • Constructor Detail

      • Die

        public Die​(java.lang.String why)
        Construct a new message explaining what has gone wrong.
        Parameters:
        why - the message to show to the end-user.
      • Die

        public Die​(java.lang.String why,
                   java.lang.Throwable cause)
        Construct a new message explaining what has gone wrong.
        Parameters:
        why - the message to show to the end-user.
        cause - why the command has failed.
      • Die

        public Die​(boolean aborted)
        Construct a new exception reflecting the fact that the command execution has been aborted before running.
        Parameters:
        aborted - boolean indicating the fact the execution has been aborted
        Since:
        3.4
      • Die

        public Die​(boolean aborted,
                   java.lang.Throwable cause)
        Construct a new exception reflecting the fact that the command execution has been aborted before running.
        Parameters:
        aborted - boolean indicating the fact the execution has been aborted
        cause - can be null
        Since:
        4.2
    • Method Detail

      • isAborted

        public boolean isAborted()
        Check if this exception should cause the execution to be aborted.
        Returns:
        boolean indicating that the execution should be aborted
        Since:
        3.4