无法在Jira Client中捕获SSLHandshakeException

时间:2019-06-09 15:40:41

标签: java rest jira jira-rest-api jira-rest-java-api

我无法在catch块中捕获SSLHandshakeException,并怀疑它是AsynchronousJiraRestClientFactory的异步性质。关于正确处理的任何想法。我想在捕获异常时执行重试操作。

    try {
        URI jiraServerUri = URI.create(uri);

        JiraRestClientFactory factory = new AsynchronousJiraRestClientFactory();
        JiraRestClient restClient = factory.createWithBasicHttpAuthentication(jiraServerUri, username, password);

        return restClient;
    } catch (Exception e) {
        logger.error("Caught exception ", e);
        throw e;
    }

0 个答案:

没有答案