Exceptions in feeder

Issue #662 resolved
Benjamin Cordes created an issue

A general suggestion. In feeder (and wrapper) null is used as a proxy for exceptions, e.g.

try {
     htmlString = Utils.getHTML(getUrl(pair), true);
} catch (IOException ex) {
   LOG.error(ex.toString());
   return new LastPrice(true, name, pair.getOrderCurrency(), null);
}

The caller side currently looks like this:

if (lastPrice != null && !lastPrice.isError()) {

Having a LastPrice object with null as the price is suboptimal. Objects that implement error features should be exceptions, separate from internal logic. So a better approach would be to throw the exceptions and handle them on the caller side (the second block should throw the exception instead of creating the null filled object). Because this way now the caller has to check whether that method returned an exception, but the exception logic is not separated from the normal logic. With try and catch on the caller side one can handle error logic separately. It would read something like:

try {
LastPrice lastPrice = tempFeed.getLastPrice(pair);
} catch(FeedCallException e){
 //dedicated error logic. maybe call feed again or throw exception to feedmanager
}