de.mathema.pride
Interface ExceptionListener
public interface ExceptionListener
The exception listener interface must be implemented by types
which want to get informed about unexpected exceptions within
PriDE API operations. Every Database
objects has the
ExceptionListener associated which is set as default listener
in the DatabaseFactory
. You can register your own
ExceptinListener by calling
setDefaultExceptionListener
.
- Author:
- Jan Lessner
Method Summary |
void |
process(Database db,
java.lang.Exception x)
Process an exception which caused the current operation to fail
but does not compromise the system integrity. |
void |
processSevere(Database db,
java.lang.Exception x)
Process an exception which compromise the system integrity. |
REVISION_ID
static final java.lang.String REVISION_ID
- See Also:
- Constant Field Values
process
void process(Database db,
java.lang.Exception x)
throws java.lang.Exception
- Process an exception which caused the current operation to fail
but does not compromise the system integrity.
- Parameters:
db
- The database object the operation of which caused
the exception. This might be null, if the exception occured
in the DatabaseFactory
or during static initializationx
- The exception to report
- Throws:
The
- passed exception x, if no reasonable handling
can be applied.
java.lang.Exception
processSevere
void processSevere(Database db,
java.lang.Exception x)
throws java.lang.RuntimeException
- Process an exception which compromise the system integrity.
In the current version, PriDE always calls this function.
- Parameters:
db
- The database object the operation of which caused
the exception. This might be null, if the exception occured
in the DatabaseFactory
or during static initializationx
- The exception to report
- Throws:
A
- RuntimeException
if any. In general, the
function is supposed not to return at all but to shut down
the application savely.
java.lang.RuntimeException