protected R handleException ( final Exception e , final HttpActionAdapter < R , C > httpActionAdapter , final C context ) { if ( httpActionAdapter == null || context == null ) { throw runtimeException ( e ) ; } else if ( e instanceof HttpAction ) { final HttpAction action = ( HttpAction ) e ; logger . debug ( "extra HTTP action required in security: {}" , action . getCode ( ) ) ; return httpActionAdapter . adapt ( action , context ) ; } else { if ( CommonHelper . isNotBlank ( errorUrl ) ) { final HttpAction action = RedirectionActionHelper . buildRedirectUrlAction ( context , errorUrl ) ; return httpActionAdapter . adapt ( action , context ) ; } else { throw runtimeException ( e ) ; } } }
Handle exceptions .