chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fguilla...@apache.org
Subject svn commit: r920993 - /incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISObjectsCollection.java
Date Tue, 09 Mar 2010 17:23:45 GMT
Author: fguillaume
Date: Tue Mar  9 17:23:45 2010
New Revision: 920993

URL: http://svn.apache.org/viewvc?rev=920993&view=rev
Log:
CMIS-138: better mapping of exceptions to HTTP status

Modified:
    incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISObjectsCollection.java

Modified: incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISObjectsCollection.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISObjectsCollection.java?rev=920993&r1=920992&r2=920993&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISObjectsCollection.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-atompub-server/src/main/java/org/apache/chemistry/atompub/server/CMISObjectsCollection.java
Tue Mar  9 17:23:45 2010
@@ -551,8 +551,10 @@ public abstract class CMISObjectsCollect
             return buildCreateEntryResponse(link, entry);
         } catch (ResponseContextException e) {
             return createErrorResponse(e);
+        } catch (IllegalArgumentException e) {
+           return createErrorResponse(new ResponseContextException(400, e));
         } catch (ConstraintViolationException e) {
-            return createErrorResponse(new ResponseContextException(400, e));
+            return createErrorResponse(new ResponseContextException(409, e));
         } catch (CMISRuntimeException e) {
             return createErrorResponse(new ResponseContextException(500, e));
         } catch (Exception e) {



Mime
View raw message