Package Torello.Java

Class UnreachableError

  • All Implemented Interfaces:
    java.io.Serializable

    public class UnreachableError
    extends java.lang.Error
    UnreachableError - Documentation.

    If a code-block that was theoretically unreachable is actually reached, this exception may be used. The detail message in this class may not be configured with the constructors to this class. It's a pre-defined message, and informs the reader that the problem is with logic itself, and should be thought of as a more serious error, that needs to be addressed.
    See Also:
    Serialized Form




    • Method Summary

      • 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

      • serialVersionUID

        public static final long serialVersionUID
        This fulfils the SerialVersion UID requirement for all classes that implement Java's interface java.io.Serializable. Using the Serializable Implementation offered by java is very easy, and can make saving program state when debugging a lot easier. It can also be used in place of more complicated systems like "hibernate" to store data as well.

        Note that Java's java.lang.Exception and java.lang.Error classes implement the Serializable interface, and a warning-free build expects this field be defined here.
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
        1
        public static final long serialVersionUID = 1;
        
    • Constructor Detail

      • UnreachableError

        public UnreachableError()
        Constructs a UnreachableError with a pre-defined detail-message.
        Code:
        Exact Constructor Body:
        1
        2
        3
        4
         super(
             "This code path has reached a point that was theoretically, or thought-to-be " +
             "unreachable.  This is the fault of the developer of this class or package."
         );
        
      • UnreachableError

        public UnreachableError​(java.lang.Throwable cause)
        Constructs a new exception with the specified 'cause' and a pre-defined
        Parameters:
        cause - The cause (which is saved for later retrieval by the Throwable.getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
        Code:
        Exact Constructor Body:
        1
        2
        3
        4
        5
        6
         super(
             "This code path has reached a point that was theoretically, or thought-to-be " +
             "unreachable.  This is the fault of the developer of this class package.  A cause " +
             "Throwable has been provided.  Please see this.getCause() for more information.",
             cause
         );