public < T extends Throwable > Micronaut mapError ( Class < T > exception , Function < T , Integer > mapper ) { this . exitHandlers . put ( exception , ( Function < Throwable , Integer > ) mapper ) ; return this ; }
Maps an exception to the given error code .