From 4f10436f68115773d86be96fa3a2040d859ade1f Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 29 May 2009 07:39:20 +0200 Subject: [PATCH] Store and re-throw exception. --- src/net/pterodactylus/jsite/core/NodeManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/net/pterodactylus/jsite/core/NodeManager.java b/src/net/pterodactylus/jsite/core/NodeManager.java index dd8440a..db63df9 100644 --- a/src/net/pterodactylus/jsite/core/NodeManager.java +++ b/src/net/pterodactylus/jsite/core/NodeManager.java @@ -405,15 +405,16 @@ public class NodeManager implements Iterable, PropertyChangeListener { if (nodes.isEmpty()) { throw new NoNodeException("no node configured"); } + FcpException fcpException = null; for (FcpClient fcpClient : nodeClients.values()) { try { SSKKeypair sskKeypair = fcpClient.generateKeyPair(); return new String[] { sskKeypair.getInsertURI(), sskKeypair.getRequestURI() }; } catch (FcpException fcpe1) { - /* ignore, we’ll throw later on if needs be. */ + fcpException = fcpe1; } } - throw new JSiteException("Could not get SSK key pair from any node."); + throw new JSiteException("Could not get SSK key pair from any node.", fcpException); } // -- 2.7.4