edu.rice.cs.javalanglevels.util
Class UnexpectedException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by edu.rice.cs.javalanglevels.util.UnexpectedException
All Implemented Interfaces:
Serializable

public class UnexpectedException
extends RuntimeException

DUPLICATES edu.rice.cs.util.UnexpectedException in the drjava code base. An exception which DrJava throws on an unexpected error. Many times, we have to catch BadLocationExceptions in code that accesses DefinitionDocument, even if we know for a fact that a BadLocationException cannot occur. In that case, and in other similar cases where we know that an exception should not occur, we throw this on the off chance that something does go wrong. This aids us in debugging the code.

See Also:
Serialized Form

Constructor Summary
UnexpectedException()
          Constructs a new RuntimeException to report that unreachable point in code has been reached
UnexpectedException(String msg)
          Constructs a new RuntimeException to report specified message
UnexpectedException(Throwable value)
          Constructs an unexpected exception with value.toString() as it's message.
UnexpectedException(Throwable value, String msg)
          Constructs an unexpected exception for value with custom message string + value.toString().
 
Method Summary
 Throwable getCause()
          Returns the contained exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnexpectedException

public UnexpectedException(Throwable value)
Constructs an unexpected exception with value.toString() as it's message.


UnexpectedException

public UnexpectedException(Throwable value,
                           String msg)
Constructs an unexpected exception for value with custom message string + value.toString().


UnexpectedException

public UnexpectedException()
Constructs a new RuntimeException to report that unreachable point in code has been reached


UnexpectedException

public UnexpectedException(String msg)
Constructs a new RuntimeException to report specified message

Method Detail

getCause

public Throwable getCause()
Returns the contained exception.

Overrides:
getCause in class Throwable