public String handle ( final Exception e , final RequestContext requestContext ) { val messageContext = requestContext . getMessageContext ( ) ; if ( e instanceof AuthenticationException ) { return handleAuthenticationException ( ( AuthenticationException ) e , requestContext ) ; } if ( e instanceof AbstractTicketException ) { return handleAbstractTicketException ( ( AbstractTicketException ) e , requestContext ) ; } LOGGER . trace ( "Unable to translate errors of the authentication exception [{}]. Returning [{}]" , e , UNKNOWN ) ; val messageCode = this . messageBundlePrefix + UNKNOWN ; messageContext . addMessage ( new MessageBuilder ( ) . error ( ) . code ( messageCode ) . build ( ) ) ; return UNKNOWN ; }
Maps an authentication exception onto a state name . Also sets an ERROR severity message in the message context .