incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apope...@apache.org
Subject svn commit: r376134 - /incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/objectconverter/impl/ObjectConverterImpl.java
Date Thu, 09 Feb 2006 00:45:48 GMT
Author: apopescu
Date: Wed Feb  8 16:45:48 2006
New Revision: 376134

URL: http://svn.apache.org/viewcvs?rev=376134&view=rev
Log:
handle ValueFormatException

Modified:
    incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/objectconverter/impl/ObjectConverterImpl.java

Modified: incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/objectconverter/impl/ObjectConverterImpl.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/objectconverter/impl/ObjectConverterImpl.java?rev=376134&r1=376133&r2=376134&view=diff
==============================================================================
--- incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/objectconverter/impl/ObjectConverterImpl.java
(original)
+++ incubator/graffito/trunk/jcr/jcr-mapping/src/java/org/apache/portals/graffito/jcr/persistence/objectconverter/impl/ObjectConverterImpl.java
Wed Feb  8 16:45:48 2006
@@ -25,6 +25,7 @@
 import javax.jcr.Session;
 import javax.jcr.Value;
 import javax.jcr.ValueFactory;
+import javax.jcr.ValueFormatException;
 import javax.jcr.lock.LockException;
 import javax.jcr.nodetype.ConstraintViolationException;
 import javax.jcr.nodetype.NoSuchNodeTypeException;
@@ -302,9 +303,16 @@
                 }
             }
         }
+        catch(ValueFormatException vfe) {
+            throw new PersistenceException( "Cannot retrieve properties of object "
+                    + object
+                    + " from node "
+                    + node,
+                    vfe);
+        }
         catch(RepositoryException re) {
             throw new org.apache.portals.graffito.jcr.exception.RepositoryException(
-                    "Cannot retrieve properties of object"
+                    "Cannot retrieve properties of object "
                     + object
                     + " from node "
                     + node,
@@ -556,9 +564,29 @@
                 }
             }
         }
+        catch(ValueFormatException vfe) {
+            throw new PersistenceException("Cannot persist properties of object " + object
+                    + ". Value format exception.",
+                    vfe);
+        }
+        catch(VersionException ve) {
+            throw new PersistenceException("Cannot persist properties of object " + object
+                    + ". Versioning exception.",
+                    ve);
+        }
+        catch(LockException le) {
+            throw new PersistenceException("Cannot persist properties of object " + object
+                    + " on locked node.",
+                    le);
+        }
+        catch(ConstraintViolationException cve) {
+            throw new PersistenceException("Cannot persist properties of object " + object
+                    + ". Constraint violation.",
+                    cve);
+        }
         catch(RepositoryException re) {
             throw new org.apache.portals.graffito.jcr.exception.RepositoryException(
-                    "Cannot persist properties of object" + object,
+                    "Cannot persist properties of object " + object,
                     re);
         }
     }



Mime
View raw message