Author: toad
Date: 2006-03-29 23:12:25 +0000 (Wed, 29 Mar 2006)
New Revision: 8360

Modified:
   trunk/freenet/src/freenet/clients/http/DarknetConnectionsToadlet.java
   trunk/freenet/src/freenet/node/Version.java
Log:
590: More verbose error when adding peers.

Modified: trunk/freenet/src/freenet/clients/http/DarknetConnectionsToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/DarknetConnectionsToadlet.java       
2006-03-29 22:46:52 UTC (rev 8359)
+++ trunk/freenet/src/freenet/clients/http/DarknetConnectionsToadlet.java       
2006-03-29 23:12:25 UTC (rev 8360)
@@ -220,21 +220,21 @@
                        try {
                                fs = new SimpleFieldSet(ref, false);
                        } catch (IOException e) {
-                               this.sendErrorPage(ctx, 200, "Failed to add 
node", "Unable to parse the given text: <pre>"+reftext+"</pre> as a node 
reference. Please <a href=\".\">Try again</a>.");
+                               this.sendErrorPage(ctx, 200, "Failed to add 
node", "Unable to parse the given text: <pre>"+ref+"</pre> as a node reference: 
"+e+" Please <a href=\".\">Try again</a>.");
                                return;
                        }
                        PeerNode pn;
                        try {
                                pn = new PeerNode(fs, this.node);
                        } catch (FSParseException e1) {
-                               this.sendErrorPage(ctx, 200, "Failed to add 
node", "Unable to parse the given text: <pre>"+reftext+"</pre> as a node 
reference. Please <a href=\".\">Try again</a>.");
+                               this.sendErrorPage(ctx, 200, "Failed to add 
node", "Unable to parse the given text: <pre>"+ref+"</pre> as a node reference: 
"+e1+". Please <a href=\".\">Try again</a>.");
                                return;
                        } catch (PeerParseException e1) {
-                               this.sendErrorPage(ctx, 200, "Failed to add 
node", "Unable to parse the given text: <pre>"+reftext+"</pre> as a node 
reference. Please <a href=\".\">Try again</a>.");
+                               this.sendErrorPage(ctx, 200, "Failed to add 
node", "Unable to parse the given text: <pre>"+ref+"</pre> as a node reference: 
"+e1+". Please <a href=\".\">Try again</a>.");
                                return;
                        }
                        if(!this.node.addDarknetConnection(pn)) {
-                               this.sendErrorPage(ctx, 200, "Failed to add 
node", "Unable to add the given reference as a peer. Please <a href=\".\">Try 
again</a>.");
+                               this.sendErrorPage(ctx, 200, "Failed to add 
node", "We already have the given reference. Return to the connections page <a 
href=\".\">here</a>.");
                        }
                } else if (request.isParameterSet("disconnect")) {
                        //int hashcode = 
Integer.decode(request.getParam("node")).intValue();

Modified: trunk/freenet/src/freenet/node/Version.java
===================================================================
--- trunk/freenet/src/freenet/node/Version.java 2006-03-29 22:46:52 UTC (rev 
8359)
+++ trunk/freenet/src/freenet/node/Version.java 2006-03-29 23:12:25 UTC (rev 
8360)
@@ -20,7 +20,7 @@
        public static final String protocolVersion = "1.0";

        /** The build number of the current revision */
-       private static final int buildNumber = 589;
+       private static final int buildNumber = 590;

        /** Oldest build of Fred we will talk to */
        private static final int lastGoodBuild = 588;


Reply via email to