public < E extends Exception > RestHandlerExceptionResolverBuilder addHandler ( Class < ? extends E > exceptionClass , RestExceptionHandler < E , ? > exceptionHandler ) { exceptionHandlers . put ( exceptionClass , exceptionHandler ) ; return this ; }
Registers the given exception handler for the specified exception type . This handler will be also used for all the exception subtypes when no more specific mapping is found .