chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r1297991 - /chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/ObjectFactoryImpl.java
Date Wed, 07 Mar 2012 15:26:34 GMT
Author: nick
Date: Wed Mar  7 15:26:33 2012
New Revision: 1297991

URL: http://svn.apache.org/viewvc?rev=1297991&view=rev
Log:
Improve the error message for the unusual case of an unknown type

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/ObjectFactoryImpl.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/ObjectFactoryImpl.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/ObjectFactoryImpl.java?rev=1297991&r1=1297990&r2=1297991&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/ObjectFactoryImpl.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/ObjectFactoryImpl.java
Wed Mar  7 15:26:33 2012
@@ -214,8 +214,10 @@ public class ObjectFactoryImpl implement
             return new RelationshipTypeImpl(this.session, (RelationshipTypeDefinition) typeDefinition);
         } else if (typeDefinition instanceof PolicyTypeDefinition) {
             return new PolicyTypeImpl(this.session, (PolicyTypeDefinition) typeDefinition);
+        } else if (typeDefinition == null) {
+            throw new CmisRuntimeException("No base type supplied!");
         } else {
-            throw new CmisRuntimeException("Unknown base type!");
+            throw new CmisRuntimeException("Unknown base type! Received " + typeDefinition.getClass().getName());
         }
     }
 



Mime
View raw message