Refactor exception handling

This commit is contained in:
Florian Reimair 2019-08-09 17:16:11 +02:00
parent a02c2ef6a4
commit bc73844619
No known key found for this signature in database
GPG key ID: 05634D8D7A7954C8

View file

@ -190,10 +190,8 @@ public class P2PSeedNodeSnapshot extends P2PSeedNodeSnapshotBase {
try {
report.put(OnionParser.prettyPrint(host) + ".relativeNumberOfMessages." + messageType,
String.valueOf(((Counter) count).value() - referenceValues.get(messageType).value()));
} catch (MalformedURLException ignore) {
log.error("we should never got here");
} catch (NullPointerException e) {
// we got no reference-Value if we got here. strange.
} catch (MalformedURLException | NullPointerException ignore) {
log.error("we should never have gotten here", ignore);
}
});
try {