|
|
@ -56,7 +56,11 @@ public enum ExchangeSource { |
|
|
|
Gson gson = new Gson(); |
|
|
|
return gson.fromJson(reader, CoinbaseRates.class); |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("Error retrieving currency rates", e); |
|
|
|
if(log.isDebugEnabled()) { |
|
|
|
log.warn("Error retrieving currency rates", e); |
|
|
|
} else { |
|
|
|
log.warn("Error retrieving currency rates (" + e.getMessage() + ")"); |
|
|
|
} |
|
|
|
return new CoinbaseRates(); |
|
|
|
} |
|
|
|
} |
|
|
@ -87,7 +91,11 @@ public enum ExchangeSource { |
|
|
|
Gson gson = new Gson(); |
|
|
|
return gson.fromJson(reader, CoinGeckoRates.class); |
|
|
|
} catch(Exception e) { |
|
|
|
log.error("Error retrieving currency rates", e); |
|
|
|
if(log.isDebugEnabled()) { |
|
|
|
log.warn("Error retrieving currency rates", e); |
|
|
|
} else { |
|
|
|
log.warn("Error retrieving currency rates (" + e.getMessage() + ")"); |
|
|
|
} |
|
|
|
return new CoinGeckoRates(); |
|
|
|
} |
|
|
|
} |
|
|
|