From: David ‘Bombe’ Roden Date: Thu, 9 Jun 2011 16:31:41 +0000 (+0200) Subject: Throw an exception when the node is not connected. X-Git-Tag: 0.10-rc1~74 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=e2dd2e8bb5771f1ae859b15fab1c4eefa31faf0e;p=jSite.git Throw an exception when the node is not connected. --- 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);