Module org.firebirdsql.jaybird
Package org.firebirdsql.gds.ng.listeners

# Interface ExceptionListener

All Known Implementing Classes:
  `ExceptionListenerDispatcher`, `FBManagedConnection`

public interface ExceptionListener
Listener for notifications of SQL Exceptions that occurred in the object listened on.

The primary use case of this interface is to bridge the gap between the XCA managed connection or connection pools that need to detect fatal errors. In the implementation only the methods defined in the various `Fb*` interfaces in `org.firebirdsql.gds.ng` are required to notify the listeners.

Listeners registered on a `FbDatabase` or `FbService` will also be notified of errors occurring in subordinate objects (eg statements).

It is possible that a single exception is notified multiple times. Listeners should be prepared to handle this appropriately.

Since:
  3.0
Author:
  Mark Rotteveel

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `errorOccurred(Object source, SQLException ex)`
  Notify about a SQLException

- ## Method Details

  - ### errorOccurred

    void errorOccurred(Object source, SQLException ex)
    Notify about a SQLException
    Parameters:
      `source` - The source of the event; note for caller: this should be the object this listener is registered at.
      `ex` - error that occurred.