edu.rice.cs.util
Class UnexpectedException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--edu.rice.cs.util.UnexpectedException
All Implemented Interfaces:
Serializable

public class UnexpectedException
extends RuntimeException

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.

Version:
$Id: UnexpectedException.java,v 1.5 2002/04/14 21:04:57 centgraf Exp $
See Also:
Serialized Form

Field Summary
private  Throwable _value
           
 
Fields inherited from class java.lang.Throwable
backtrace, detailMessage, serialVersionUID
 
Constructor Summary
UnexpectedException(Throwable value)
          Constructs an unexpected exception with value.toString() as it's message.
UnexpectedException(Throwable value, String msg)
          Constructs an unexpected exception with a custom message string in addition to value.toString().
 
Method Summary
 Throwable getContainedThrowable()
          Returns the contained exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, printStackTrace0, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

_value

private Throwable _value
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 with a custom message string in addition to value.toString().
Method Detail

getContainedThrowable

public Throwable getContainedThrowable()
Returns the contained exception.