protected Event buildEventFromException(final Throwable exception,
                                            final RequestContext requestContext,
                                            final List<Credential> credential,
                                            final Service service) {
        val event = WebflowExceptionTranslator.from(exception, requestContext);
        LoggingUtils.warn(LOGGER, exception);
        val attributes = new LocalAttributeMap<>();
        attributes.put(CasWebflowConstants.TRANSITION_ID_ERROR, event.getSource());
        if (!credential.isEmpty()) {
            attributes.put(Credential.class.getName(), credential.getFirst());
        }
        attributes.put(WebApplicationService.class.getName(), service);
        attributes.putAll(event.getAttributes());
        val request = WebUtils.getHttpServletRequestFromExternalWebflowContext(requestContext);
        attributes.put("url", HttpRequestUtils.getFullRequestUrl(request));
        return newEvent(event.getId(), attributes);
    }
This is {@link DefaultCasDelegatingWebflowEventResolver},
which handles the initial authentication attempt and calls upon a number of
embedded resolvers to produce the next event in the authentication flow.

@author Misagh Moayyed
@since 5.0.0
core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/resolver/impl/DefaultCasDelegatingWebflowEventResolver.java