Author: taylor
Date: Fri Jul 21 10:44:08 2006
New Revision: 424401

URL: http://svn.apache.org/viewvc?rev=424401&view=rev
Log:
better display error message for xml syntax errors
patch from Steve Milek

Modified:
    
portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/CastorFileSystemDocumentHandler.java

Modified: 
portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/CastorFileSystemDocumentHandler.java
URL: 
http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/CastorFileSystemDocumentHandler.java?rev=424401&r1=424400&r2=424401&view=diff
==============================================================================
--- 
portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/CastorFileSystemDocumentHandler.java
 (original)
+++ 
portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/document/psml/CastorFileSystemDocumentHandler.java
 Fri Jul 21 10:44:08 2006
@@ -472,28 +472,34 @@
         }
         catch (IOException e)
         {
+               log.error("Could not load the file " + f.getAbsolutePath(), e);
             throw new PageNotFoundException("Could not load the file " + 
f.getAbsolutePath(), e);
         }
         catch (MarshalException e)
         {
+               log.error("Could not unmarshal the file " + 
f.getAbsolutePath(), e);
             throw new PageNotFoundException("Could not unmarshal the file " + 
f.getAbsolutePath(), e);
         }
         catch (MappingException e)
         {
+               log.error("Could not unmarshal the file " + 
f.getAbsolutePath(), e);
             throw new PageNotFoundException("Could not unmarshal the file " + 
f.getAbsolutePath(), e);
         }
         catch (ValidationException e)
         {
+               log.error("Document " + f.getAbsolutePath() + " is not valid", 
e);
             throw new DocumentNotFoundException("Document " + 
f.getAbsolutePath() + " is not valid", e);
         }
         catch (SAXException e)
-            {
+        {
+               log.error("Could not unmarshal the file " + 
f.getAbsolutePath(), e);
             throw new PageNotFoundException("Could not unmarshal the file " + 
f.getAbsolutePath(), e);
-            }
+        }
         catch (ParserConfigurationException e)
-            {
+        {
+               log.error("Could not unmarshal the file " + 
f.getAbsolutePath(), e);
             throw new PageNotFoundException("Could not unmarshal the file " + 
f.getAbsolutePath(), e);
-            }
+        }
         
 
         if (document == null)



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to