Skip to content

Commit

Permalink
Chain the cause exception and log in case of failure
Browse files Browse the repository at this point in the history
  • Loading branch information
batmat committed Sep 14, 2017
1 parent 14d43ef commit 0251d10
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,9 @@ private void checkApiUrlValidity(GitHub github) throws IOException {
github.checkApiUrlValidity();
} catch (HttpException e) {
String message = String.format("It seems %s is unreachable", apiUri == null ? GITHUB_URL : apiUri);
AbortException abortException = new AbortException(message);
abortException.initCause(e);
LOGGER.log(Level.WARNING, "Issue while checking GitHub URL validity", e);
throw new AbortException(message);
}
}
Expand Down

0 comments on commit 0251d10

Please sign in to comment.