org.apache.hivemind
Class ApplicationRuntimeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.apache.hivemind.ApplicationRuntimeException
All Implemented Interfaces:
java.io.Serializable, Locatable

public class ApplicationRuntimeException
extends java.lang.RuntimeException
implements Locatable

General wrapper for any exception (normal or runtime) that may occur during runtime processing for the application. This is exception is used when the intent is to communicate a low-level failure to the user or developer; it is not expected to be caught. The rootCause property is a nested exception.

Author:
Howard Lewis Ship
See Also:
Serialized Form

Constructor Summary
ApplicationRuntimeException(java.lang.String message)
           
ApplicationRuntimeException(java.lang.String message, Location location, java.lang.Throwable rootCause)
           
ApplicationRuntimeException(java.lang.String message, java.lang.Object component, Location location, java.lang.Throwable rootCause)
           
ApplicationRuntimeException(java.lang.String message, java.lang.Throwable rootCause)
           
ApplicationRuntimeException(java.lang.Throwable rootCause)
           
 
Method Summary
 java.lang.Throwable getCause()
          This method is for compatibility with JDK 1.4.
 java.lang.Object getComponent()
           
 Location getLocation()
          Returns the location from which this object orginates, or null if not known.
 java.lang.Throwable getRootCause()
           
 java.lang.String toString()
          Overrides the default implementation of toString, suffixing the normal result with the location of the exception (if non null).
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApplicationRuntimeException

public ApplicationRuntimeException(java.lang.Throwable rootCause)

ApplicationRuntimeException

public ApplicationRuntimeException(java.lang.String message)

ApplicationRuntimeException

public ApplicationRuntimeException(java.lang.String message,
                                   java.lang.Throwable rootCause)

ApplicationRuntimeException

public ApplicationRuntimeException(java.lang.String message,
                                   java.lang.Object component,
                                   Location location,
                                   java.lang.Throwable rootCause)

ApplicationRuntimeException

public ApplicationRuntimeException(java.lang.String message,
                                   Location location,
                                   java.lang.Throwable rootCause)
Method Detail

getRootCause

public java.lang.Throwable getRootCause()

getLocation

public Location getLocation()
Description copied from interface: Locatable
Returns the location from which this object orginates, or null if not known.

Specified by:
getLocation in interface Locatable

getComponent

public java.lang.Object getComponent()

getCause

public java.lang.Throwable getCause()
This method is for compatibility with JDK 1.4. Under 1.4, this will look like an override, allowing printStackTrace() to descending into the root cause exception and print its stack trace too.

Overrides:
getCause in class java.lang.Throwable

toString

public java.lang.String toString()
Overrides the default implementation of toString, suffixing the normal result with the location of the exception (if non null). Example: org.apache.hivemind.ApplicationRuntimeException: Exception Message [file:foo/bar/baz, line 13].

Overrides:
toString in class java.lang.Throwable
Since:
1.1