From e2dd2e8bb5771f1ae859b15fab1c4eefa31faf0e Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 9 Jun 2011 18:31:41 +0200 Subject: [PATCH] Throw an exception when the node is not connected. --- src/de/todesbaum/jsite/application/Freenet7Interface.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/de/todesbaum/jsite/application/Freenet7Interface.java b/src/de/todesbaum/jsite/application/Freenet7Interface.java index a271f6b..ae5c967 100644 --- a/src/de/todesbaum/jsite/application/Freenet7Interface.java +++ b/src/de/todesbaum/jsite/application/Freenet7Interface.java @@ -142,7 +142,7 @@ public class Freenet7Interface { */ public String[] generateKeyPair() throws IOException { if (!isNodePresent()) { - return null; + throw new IOException("Node is offline."); } GenerateSSK generateSSK = new GenerateSSK(); Client client = new Client(connection, generateSSK); -- 2.7.4