shouldn't we also display the internal error to help us debug the pb?
"Internal error = [" + e.getMessage() + "]"...
-Vincent
On Apr 25, 2008, at 11:26 AM, sdumitriu (SVN) wrote:
Author: sdumitriu
Date: 2008-04-25 11:26:15 +0200 (Fri, 25 Apr 2008)
New Revision: 9376
Modified:
xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/
doc/XWikiAttachment.java
Log:
XWIKI-2336: Broken attachments can break working with a document
Better logging
Modified: xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/
xwiki/doc/XWikiAttachment.java
===================================================================
--- xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/
doc/XWikiAttachment.java 2008-04-25 08:22:12 UTC (rev 9375)
+++ xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/
doc/XWikiAttachment.java 2008-04-25 09:26:15 UTC (rev 9376)
@@ -493,7 +493,9 @@
try {
context.getWiki().getAttachmentStore().loadAttachmentContent(this,
context, true);
} catch (Exception ex) {
- LOG.error("Failed to load content for attachment ["
+ getFilename() + "]", ex);
+ LOG.warn(String.format("Failed to load content for
attachment [%s@%s]. "
+ + "This attachment is broken, please consider
re-uploading it.",
+ getFilename(), (doc != null) ?
doc.getFullName() : "<unknown>"));
}
}
}
@@ -506,7 +508,9 @@
context.getWiki().getAttachmentVersioningStore().loadArchive(this,
context,
true);
} catch (Exception ex) {
- LOG.error("Failed to load archive for attachment ["
+ getFilename() + "]", ex);
+ LOG.warn(String.format("Failed to load archive for
attachment [%s@%s]. "
+ + "This attachment is broken, please consider
re-uploading it.",
+ getFilename(), (doc != null) ?
doc.getFullName() : "<unknown>"));
}
}
return attachment_archive;
_______________________________________________
notifications mailing list
notifications(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/notifications