chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1579929 - in /chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl: atompub/CmisAtomPubServlet.java browser/CmisBrowserBindingServlet.java
Date Fri, 21 Mar 2014 12:01:49 GMT
Author: fmui
Date: Fri Mar 21 12:01:49 2014
New Revision: 1579929

URL: http://svn.apache.org/r1579929
Log:
Server: IOExceptions aren't errors

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/CmisAtomPubServlet.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/CmisBrowserBindingServlet.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/CmisAtomPubServlet.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/CmisAtomPubServlet.java?rev=1579929&r1=1579928&r2=1579929&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/CmisAtomPubServlet.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/CmisAtomPubServlet.java
Fri Mar 21 12:01:49 2014
@@ -283,6 +283,8 @@ public class CmisAtomPubServlet extends 
         } else if (ex instanceof CmisBaseException) {
             statusCode = getErrorCode((CmisBaseException) ex);
             exceptionName = ((CmisBaseException) ex).getExceptionName();
+        } else if (ex instanceof IOException) {
+            LOG.warn(ex.getMessage(), ex);
         } else {
             LOG.error(ex.getMessage(), ex);
         }
@@ -297,9 +299,9 @@ public class CmisAtomPubServlet extends 
             response.setStatus(statusCode);
             response.setContentType("text/html");
             response.setCharacterEncoding(IOUtils.UTF8);
-            
+
             PrintWriter pw = response.getWriter();
-            
+
             pw.print("<html><head><title>Apache Chemistry OpenCMIS - "
                     + exceptionName
                     + " error</title>"

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/CmisBrowserBindingServlet.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/CmisBrowserBindingServlet.java?rev=1579929&r1=1579928&r2=1579929&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/CmisBrowserBindingServlet.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/CmisBrowserBindingServlet.java
Fri Mar 21 12:01:49 2014
@@ -432,6 +432,8 @@ public class CmisBrowserBindingServlet e
             } else if (ex instanceof CmisBaseException) {
                 statusCode = getErrorCode((CmisBaseException) ex);
                 exceptionName = ((CmisBaseException) ex).getExceptionName();
+            } else if (ex instanceof IOException) {
+                LOG.warn(ex.getMessage(), ex);
             } else {
                 LOG.error(ex.getMessage(), ex);
             }
@@ -447,7 +449,7 @@ public class CmisBrowserBindingServlet e
             if (token == null) {
                 response.resetBuffer();
                 setStatus(request, response, statusCode);
-  
+
                 JSONObject jsonResponse = new JSONObject();
                 jsonResponse.put(ERROR_EXCEPTION, exceptionName);
                 jsonResponse.put(ERROR_MESSAGE, ex.getMessage());



Mime
View raw message