public static interface Session.ErrorHandler
Session errors indicate that an unexpected condition has occurred. They have a similar purpose to Java exceptions, except they are delivered asynchronously. Session errors are used sparingly. Error conditions that occur in the context of an API operation and that an application can reasonably handle are reported to operation-specific callbacks, not as session errors.
An application can typically do nothing about a session error other than to report it for diagnosis. The server log should be examined for further information. Errors may be a consequence of a failed client operation, so it is usually appropriate for the application to close the session on receiving an error.
Modifier and Type | Interface and Description |
---|---|
static class |
Session.ErrorHandler.Default
Default
Session.ErrorHandler implementation which simply logs errors
at error level. |
Modifier and Type | Method and Description |
---|---|
void |
onError(Session session,
Session.SessionError error)
Called when an error has occurred.
|
void onError(Session session, Session.SessionError error)
session
- the sessionerror
- the error detailCopyright © 2024 DiffusionData Ltd. All Rights Reserved.