Skip to content

Commit

Permalink
Use more specific exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
jamezrin committed Nov 30, 2018
1 parent 81c2031 commit f56387d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public EndpointClient(CloseableHttpClient httpClient) {
}
}

private HttpResponse connect(String cardPrefix, String cardNumber, boolean retryIfUnsuccessful) throws Exception {
private HttpResponse connect(String cardPrefix, String cardNumber, boolean retryIfUnsuccessful) throws IOException, UnsuccessfulRequestException {
EndpointConnector connector = new EndpointConnector(viewState, cardPrefix, cardNumber);

try {
Expand All @@ -58,7 +58,7 @@ private HttpResponse connect(String cardPrefix, String cardNumber, boolean retry
);
}

public HttpResponse connect(String cardPrefix, String cardNumber) throws Exception {
public HttpResponse connect(String cardPrefix, String cardNumber) throws IOException, UnsuccessfulRequestException {
return connect(
cardPrefix,
cardNumber,
Expand Down

0 comments on commit f56387d

Please sign in to comment.