notio
Class OperationError

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Error
              |
              +--notio.OperationError
Direct Known Subclasses:
ActorAddError, ConceptAddError, RelationAddError, TypeAddError, TypeChangeError, TypeRemoveError

public class OperationError
extends java.lang.Error

The base Notio operation error class. This error class allows other throwables to be embedded in it. This provides a clean means for implementation-specific throwables to be thrown from Notio routines. Note that since OperationError is a subclass of Error, applications are not required to explicitly throw or catch it. As such it is reserved for Notio errors that are most probably due to a programming error in the application rather than a reasonable misuse of the API.

See Also:
Error, Serialized Form

Constructor Summary
OperationError(java.lang.String message)
          Constructs an error with the specified message.
OperationError(java.lang.String message, java.lang.Throwable newSubThrowable)
          Constructs an error with the specified message and sub-throwable.
 
Method Summary
 java.lang.Throwable getSubThrowable()
          This method retrieves arbitrary throwables embedded inside OperationErrors and thrown along with them.
 void setSubThrowable(java.lang.Throwable newSubThrowable)
          This method allows arbitrary throwables to be embedded inside OperationErrors and thrown along with them.
 
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

OperationError

public OperationError(java.lang.String message)
Constructs an error with the specified message.
Parameters:
message - the details of the error.

OperationError

public OperationError(java.lang.String message,
                      java.lang.Throwable newSubThrowable)
Constructs an error with the specified message and sub-throwable.
Parameters:
message - the details of the error.
newSubThrowable - the sub-throwable to be embedded in this OperationError.
Method Detail

setSubThrowable

public void setSubThrowable(java.lang.Throwable newSubThrowable)
This method allows arbitrary throwables to be embedded inside OperationErrors and thrown along with them. The embedded throwables can give further details of what happened or be used to pass implementation-specific throwables through the standard Notio API. This method will replace any existing sub-throwable.
Parameters:
newSubThrowable - the sub-throwable to be embedded in this OperationError.

getSubThrowable

public java.lang.Throwable getSubThrowable()
This method retrieves arbitrary throwables embedded inside OperationErrors and thrown along with them. The embedded throwables can give further details of what happened or be used to pass implementation-specific throwables through the standard Notio API.
Returns:
the sub-throwable or null if none is present.


Copyright 1998-1999 Finnegan Southey