Author: toad
Date: 2009-03-06 22:35:57 +0000 (Fri, 06 Mar 2009)
New Revision: 25913
Modified:
branches/db4o/freenet/src/freenet/client/FetchException.java
Log:
FetchException clone()
Modified: branches/db4o/freenet/src/freenet/client/FetchException.java
===================================================================
--- branches/db4o/freenet/src/freenet/client/FetchException.java
2009-03-06 22:34:38 UTC (rev 25912)
+++ branches/db4o/freenet/src/freenet/client/FetchException.java
2009-03-06 22:35:57 UTC (rev 25913)
@@ -241,6 +241,23 @@
Logger.minor(this, "FetchException("+getMessage(mode)+
')', this);
}
+ public FetchException(FetchException e) {
+ super(e.getMessage());
+ initCause(e);
+ this.mode = e.mode;
+ this.newURI = e.newURI.clone();
+ this.errorCodes = e.errorCodes.clone();
+ this.expectedMimeType = e.expectedMimeType;
+ this.expectedSize = e.expectedSize;
+ this.extraMessage = e.extraMessage;
+ this.finalizedSizeAndMimeType = e.finalizedSizeAndMimeType;
+ if(mode == INTERNAL_ERROR)
+ Logger.error(this, "Internal error: "+this);
+ else if(Logger.shouldLog(Logger.MINOR, this))
+ Logger.minor(this, "FetchException("+getMessage(mode)+
')', this);
+ // TODO Auto-generated constructor stub
+ }
+
public static String getShortMessage(int mode) {
String ret = L10n.getString("FetchException.shortError."+mode);
if(ret == null)
@@ -406,4 +423,8 @@
newURI.removeFrom(container);
container.delete(this);
}
+
+ public FetchException clone() {
+ return new FetchException(this);
+ }
}
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs