- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.io7m.junreachable.UnreachableCodeException
-
- All Implemented Interfaces:
Serializable
public final class UnreachableCodeException extends RuntimeException
The type of exceptions thrown upon reaching code that was expected to be unreachable.
As correctly written programs should never raise exceptions of this type, their use in code is intended to document the fact that a statement is expected to be unreachable (but that the compiler cannot prove is actually unreachable).
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UnreachableCodeException()Construct a new exception without a specific cause.UnreachableCodeException(Throwable x)Construct a new exception with the given cause.
-
Method Summary
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
UnreachableCodeException
public UnreachableCodeException()
Construct a new exception without a specific cause.
-
UnreachableCodeException
public UnreachableCodeException(Throwable x)
Construct a new exception with the given cause.- Parameters:
x- The cause
-
-