Class 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:
  • Constructor Details

    • 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