From aaba08b539df7fb8db17f16d6802e31fb5f3bfaa Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 12 Oct 2010 16:53:50 +0200 Subject: [PATCH] Add logging. --- src/main/java/net/pterodactylus/sone/core/FreenetInterface.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/core/FreenetInterface.java b/src/main/java/net/pterodactylus/sone/core/FreenetInterface.java index 8f9ec8f..5d0a1a2 100644 --- a/src/main/java/net/pterodactylus/sone/core/FreenetInterface.java +++ b/src/main/java/net/pterodactylus/sone/core/FreenetInterface.java @@ -69,12 +69,16 @@ public class FreenetInterface extends AbstractService { * @return The result of the fetch, or {@code null} if an error occured */ public FetchResult fetchUri(FreenetURI uri) { + logger.entering(FreenetInterface.class.getName(), "fetchUri(FreenetURI)", uri); + FetchResult fetchResult = null; try { - return client.fetch(uri); + fetchResult = client.fetch(uri); } catch (FetchException fe1) { logger.log(Level.WARNING, "Could not fetch “" + uri + "”!", fe1); - return null; + } finally { + logger.exiting(FreenetInterface.class.getName(), "fetchUri(FreenetURI)", fetchResult); } + return fetchResult; } } -- 2.7.4