sofya.ed.semantic
Interface ErrorRecorder

All Known Implementing Classes:
ObjectFilter, ThreadFilter, TraceFileTarget

public interface ErrorRecorder

Interface which marks an object as having error recording and reporting capabilities.

Objects which need to report error conditions to a controlling object, and to defer error handling by capturing and storing exceptions in lieu of handling them immediately, should implement this interface. It is intended primarily for use by event listeners which interact with a stateful and potentially unreliable underlying object, such as a file stream.

Version:
02/04/2005
Author:
Alex Kinneer

Method Summary
 java.lang.Exception getError()
          Gets the exception that put the object in an error state.
 boolean inError()
          Reports whether the object is in an error state.
 void rethrowError()
          Rethrows the originating exception if this object in an error state; does nothing if in a normal state.
 

Method Detail

inError

boolean inError()
Reports whether the object is in an error state.

Returns:
true if an error was raised at some point during the processing performed by the object.

rethrowError

void rethrowError()
                  throws java.lang.Exception
Rethrows the originating exception if this object in an error state; does nothing if in a normal state.

Throws:
java.lang.Exception - If an error was raised at some point during the processing performed by the object.

getError

java.lang.Exception getError()
Gets the exception that put the object in an error state.

Returns:
The first unrecoverable exception that put the object in an error state.