Added exception status code and message to examples.
This commit is contained in:
parent
8f08fd738b
commit
a704b955dc
5 changed files with 63 additions and 23 deletions
|
@ -38,7 +38,10 @@ public class CryptoPriceSample {
|
|||
System.out.println("The current " + buyPrice.getBase() + " buy price is " + buyPrice.getAmount()
|
||||
+ " in " + buyPrice.getCurrency());
|
||||
|
||||
} catch (CryptoException | IOException e) {
|
||||
} catch (CryptoException e) {
|
||||
System.err.println("HTTP Status Code: " + e.getStatusCode());
|
||||
System.err.println(e.getMessage());
|
||||
} catch (IOException e) {
|
||||
System.err.println(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue