Sharkysoft home

lava
Class UnreachableCodeException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--lava.UnreachableCodeException
All Implemented Interfaces:
java.io.Serializable

public class UnreachableCodeException
extends java.lang.RuntimeException

Indicates unreachable execution path.

Details: An UnreachableCodeException is thrown when an execution path that the programmer has assumed to be unreachable actually turns out to be reachable. Therefore, ideally, this exception should never be thrown, and if it is, it indicates a flaw in the programmer's thinking -- but this is better than allowing the flaw to go undetected!

As an extra safeguard to your program, always be sure to throw this exception wherever you have assumed that code is unreachable. This will help you debug your program later if it turns out that you were wrong.

There are times when an UnreachableCodeException should be used just to fool the compiler:

Since:
1998
Version:
1999.04.12
See Also:
Serialized Form

Constructor Summary
UnreachableCodeException()
          Initializes without message.
UnreachableCodeException(java.lang.String s)
          Initializes with message.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnreachableCodeException

public UnreachableCodeException()
Initializes without message.

Details: This default constructor initializes a new UnreachableCodeException without an exception message.


UnreachableCodeException

public UnreachableCodeException(java.lang.String s)
Initializes with message.

Details: This constructor initializes a new UnreachableCodeException with the given exception message.

Parameters:
s - the messsage

Sharkysoft home