Package Torello.Java
Class UnreachableError
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Error
-
- Torello.Java.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
Hi-Lited Source-Code:
- View Here: Torello/Java/UnreachableError.java
- Open New Browser-Tab: Torello/Java/UnreachableError.java
-
-
Field Summary
Fields Modifier and Type Field static long
serialVersionUID
-
Constructor Summary
Constructors Constructor UnreachableError()
UnreachableError(Throwable cause)
-
-
-
Field Detail
-
serialVersionUID
public static final long serialVersionUID
This fulfils the SerialVersion UID requirement for all classes that implement Java'sinterface java.io.Serializable
. Using theSerializable
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'sjava.lang.Exception
andjava.lang.Error
classes implement theSerializable 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 aUnreachableError
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 theThrowable.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 );
-
-