Store and re-throw exception.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 29 May 2009 05:39:20 +0000 (07:39 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 29 May 2009 05:39:20 +0000 (07:39 +0200)
src/net/pterodactylus/jsite/core/NodeManager.java

index dd8440a..db63df9 100644 (file)
@@ -405,15 +405,16 @@ public class NodeManager implements Iterable<Node>, 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);
        }
 
        //