Draft for 4.5.x
Filter exception handler
See MAGNOLIA-3595 - Getting issue details... STATUS
Right now only way how to handle exceptions thrown by filter is to extend the specific filter and catch the exception in custom class. We should provide a way how to configure exception handler to any filter.
New interface - ExceptionHandler
set/get exception list
void handle(Exception) method
Example implementation of EH - registered exception will be caught and logged under level set with the exception (LoggingExceptionHandler).
ExceptionHandler will be part of AbstractMgnlFilter. If filter have some handler configured all exceptions are caught (doFilter() method in MgnlFilterChain class will by in try block). Catch block then searches if caught exception has some behaviour configured. If yes then will follow this, if not then exception is re-thrown.
Example handler should contain settings if exact exceptions should be treated or if also sub-classes of this exception should be included. Then the level of logging should be set so caught exceptions can be treated accordingly.