Author: toad
Date: 2006-11-01 18:00:36 +0000 (Wed, 01 Nov 2006)
New Revision: 10778
Modified:
trunk/freenet/src/freenet/client/FetchException.java
Log:
Add error code for TOO_MANY_META_STRINGS. Will be used soon.
Modified: trunk/freenet/src/freenet/client/FetchException.java
===================================================================
--- trunk/freenet/src/freenet/client/FetchException.java 2006-11-01
17:51:20 UTC (rev 10777)
+++ trunk/freenet/src/freenet/client/FetchException.java 2006-11-01
18:00:36 UTC (rev 10778)
@@ -199,6 +199,8 @@
return "Archive restarted";
case PERMANENT_REDIRECT:
return "New URI";
+ case TOO_MANY_META_STRINGS:
+ return "Too many path elements";
default:
return "Unknown code "+mode;
}
@@ -280,6 +282,8 @@
return "Archive restarted";
case PERMANENT_REDIRECT:
return "Permanent redirect: use the new URI";
+ case TOO_MANY_META_STRINGS:
+ return "Too many path elements: try chopping one off";
default:
return "Unknown fetch error code: "+mode;
}
@@ -341,6 +345,8 @@
public static final int ARCHIVE_RESTART = 26;
/** There is a more recent version of the USK, ~= HTTP 301; FProxy will
turn this into a 301 */
public static final int PERMANENT_REDIRECT = 27;
+ /** Too many meta strings. E.g. requesting CHK at blah,blah,blah as CHK
at blah,blah,blah/filename.ext */
+ public static final int TOO_MANY_META_STRINGS = 28;
/** Is an error fatal i.e. is there no point retrying? */
public boolean isFatal() {
@@ -349,7 +355,7 @@
public static boolean isFatal(int mode) {
switch(mode) {
- // Problems with the data as inserted. No point retrying.
+ // Problems with the data as inserted, or the URI given. No
point retrying.
case FetchException.ARCHIVE_FAILURE:
case FetchException.BLOCK_DECODE_ERROR:
case FetchException.HAS_MORE_METASTRINGS:
@@ -365,6 +371,7 @@
case FetchException.UNKNOWN_SPLITFILE_METADATA:
case FetchException.INVALID_URI:
case FetchException.TOO_BIG:
+ case FetchException.TOO_MANY_META_STRINGS:
return true;
// Low level errors, can be retried