On Wed, Mar 12, 2008 at 4:10 AM, Vincent Massol <[EMAIL PROTECTED]> wrote:
>
>  > ===================================================================
>  > --- xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/
>  > plugin/packaging/Package.java 2008-03-12 03:55:35 UTC (rev 8423)
>  > +++ xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/
>  > plugin/packaging/Package.java 2008-03-12 04:21:37 UTC (rev 8424)
>  > @@ -385,8 +385,14 @@
>  >                     || (entry.getName().indexOf("META-INF") != -1)) {
>  >                     continue;
>  >                 } else {
>  > -                    XWikiDocument doc =
>  > -
>  > readFromXML(readByteArrayFromInputStream(zis, entry.getSize()));
>  > +                    XWikiDocument doc = null;
>  > +                    try {
>  > +                        doc =
>  > readFromXML(readByteArrayFromInputStream(zis, entry.getSize()));
>  > +                    } catch (Exception ex) {
>  > +                        log.warn("Failed to parse document [" +
>  > entry.getName() + "] from XML");
>
>  We need to also add ex.getMesage() to the log output in order to
>  better diagnose errors when they appear.
>  Also the message need to be more explicit. We need to say that we're
>  ignoring the doc and that it won't be imported.
>
>  Thanks
>  -Vincent
>

Yes, especially something that says which document it is (which it
looks like you're doing). It's the biggest pain in the butt on the
back-level version I'm on to try to figure out which of the gazillions
of documents in the package is badly formed...

-- 
'Waste of a good apple' -Samwise Gamgee
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to