try catch

This commit is contained in:
sidhujag 2018-06-03 17:23:39 -07:00
parent 4d31f152f8
commit 2845704331
1 changed files with 7 additions and 2 deletions

View File

@ -91,8 +91,13 @@ public class CoinmarketcapRateSource implements IRateSource {
}
Map<String, Object> ticker = api.getTickers(cryptoId, fiatCurrency);
String json = new ObjectMapper().writeValueAsString(ticker);
System.out.printf( "JSON: %s", json );
try {
String json = new ObjectMapper().writeValueAsString(ticker);
System.out.printf( "JSON: %s", json );
} catch (IOException e) {
e.printStackTrace();
}
/*if (cryptoCurrency.equalsIgnoreCase(ticker.getSymbol())) {
if (Currencies.EUR.equalsIgnoreCase(fiatCurrency)) {
return ticker.getPrice_eur();