protected Event newEvent(final String id, final Throwable error) {
        return newEvent(id, new LocalAttributeMap<Serializable>(CasWebflowConstants.TRANSITION_ID_ERROR, error));
    }
New event based on the id, which contains an error attribute referring to the exception occurred.

@param id    the id
@param error the error
@return the event
core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/resolver/impl/AbstractCasWebflowEventResolver.java