-
Notifications
You must be signed in to change notification settings - Fork 13
FailsafeExceptionHandler
codefriar edited this page Oct 5, 2023
·
2 revisions
STATUS: ACTIVE
This class is a polyfill for the handling exceptions. Rather than writing boilerplate exception handling code everywhere, this class can be used to log exceptions.
Implemented types
SUPPRESSWARNINGS
Constructor usage for a single exception.
Param | Description |
---|---|
incomingException |
Exception the Exception to be handled. |
`new FailsafeExceptionHandler(incomingException);`
Constructor usage for a list of exceptions.
Param | Description |
---|---|
incomingExceptions |
List the list of exceptions to be handled. |
`new FailsafeExceptionHandler(incomingExceptions);`
TESTVISIBLE
An instance of Log to log exceptions.
Handles an incoming exception by adding it to the log list.
Param | Description |
---|---|
incomingException |
Exception the exception to be handled. |
handles an list of incoming exceptions
Param | Description |
---|---|
exceptions |
List the list of exceptions to be handled. |
Implements the Callable interface. This allows the class to be used outside of a package boundary.
Param | Description |
---|---|
action |
String the action to be performed. The only one handled in this class is 'handleException'. |
args |
Map<String, Object> the arguments to be passed to the action. in this case 'incomingException' => Exception |
Type | Description |
---|---|
Object | Object returns null |