Directory Service Error Treatment

The directory servicemethods may throw the exception DataNotFoundException and its subclasses : If the application program is not interested in the exact exception, it must only catch DataNotFoundException. If the application program wants to catch any of the subclasses of DataNotFoundException it must do this before catching the more general DataNotFoundException.

In addition to throwing an exception, the directory service implementation may perform additional actions, such as writing a message to the java console or to a log file, but these actions should not interfere with the application.

Note: The directory service will itself try to reconnect to the database service before throwing a BadConnectionException. The application program should not try to solve the connection problem itself. One option is to exit, or to suspend operation until it the problem is solved.