code: 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);
              }
          }
      }
docs: Handle exceptions.
  
  @param e the thrown exception
  @param httpActionAdapter the HTTP action adapter
  @param context the web context
  @return the final HTTP result