public class CancelledException extends DBException
When catching CancelledException in the api, if the cancel happened on the current Thread you might want to check the interrupt status of the current Thread before continuing. Interrupt of the current Thread should not be assumed when catching this exception, as part the operation - e.g. statement execution - might have been threaded in a progress bar, and it was that Thread which was interrupted. In this example the calling Thread wouldn't also be interrupted, but this exception is used to notify the caller of the overall operation that something was cancelled.
Constructor and Description |
---|
CancelledException()
Creates a new cancelled exception with a generic message.
|
CancelledException(java.lang.String reason)
Creates a new cancelled exception with a specific message.
|
Modifier and Type | Method and Description |
---|---|
static void |
checkInterrupt()
Checks whether the current Thread has been interrupted.
|
append, getAllMessages, getMessage, getNextException, getObject, getRelatedObjects, setNextException, setRelatedObjects
public CancelledException()
public CancelledException(java.lang.String reason)
reason
- the reason for the cancellationpublic static void checkInterrupt() throws CancelledException
CancelledException
- if the current Thread has been interrupted.