LrJposChannel.getExceptionHandlers
Returns a map of exception classes to exception handlers.
public static Map<Class<? extends Exception>, List<ExceptionHandler>> getExceptionHandlers()
Return values
This function returns all exception handlers defined by the user, mapped by the exception that triggers their execution.
General information
You can configure custom exception handling to be implemented by jPOS.
jPOS uses a map where the key is the exception type, and the value is a list of handlers that are executed if that exception is triggered. These handlers are executed only if the exception matches.
The exception-specific handlers are executed first, and then the default handlers.
If the key is null, the handler pipeline is executed, regardless of the exception type.
Example
public void handlers() {
Map<Class<? extends Exception>, List<ExceptionHandler>> handlers = LrJposChannel.getExceptionHandlers();
handlers.entrySet().forEach((x) -> System.out.println("Exeption: " + x.getKey() + " List size: " + x.getValue().size()));
}