public void throwExceptionIfNecessary() throws Exception {
        if (failureException != null) {
            throw this.failureException;
        }
    }
Throw exception if necessary.

@throws Exception the exception
support/cas-server-support-okta-authentication/src/main/java/org/apereo/cas/okta/OktaAuthenticationStateHandlerAdapter.java