abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject svn commit: r471718 - /incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/servlet/AbstractRequestHandler.java
Date Mon, 06 Nov 2006 12:54:32 GMT
Author: ugo
Date: Mon Nov  6 04:54:31 2006
New Revision: 471718

URL: http://svn.apache.org/viewvc?view=rev&rev=471718
Log:
Don't swallow exceptions without at least logging them.

Modified:
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/servlet/AbstractRequestHandler.java

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/servlet/AbstractRequestHandler.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/servlet/AbstractRequestHandler.java?view=diff&rev=471718&r1=471717&r2=471718
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/servlet/AbstractRequestHandler.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/servlet/AbstractRequestHandler.java
Mon Nov  6 04:54:31 2006
@@ -28,6 +28,7 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.abdera.protocol.EntityTag;
 import org.apache.abdera.protocol.ResponseInfo;
 import org.apache.abdera.protocol.server.ServiceContext;
 import org.apache.abdera.protocol.server.provider.EmptyResponseContext;
@@ -37,11 +38,14 @@
 import org.apache.abdera.protocol.server.provider.ResponseContext;
 import org.apache.abdera.protocol.server.provider.Target;
 import org.apache.abdera.protocol.server.provider.TargetType;
-import org.apache.abdera.protocol.EntityTag;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 public abstract class AbstractRequestHandler 
   implements RequestHandler {
 
+  private static final Log logger = LogFactory.getLog(AbstractRequestHandler.class);
+  
   public void process(
     ServiceContext context, 
     HttpServletRequest request,
@@ -57,9 +61,11 @@
         output(response,process(provider, requestContext));
       }
     } catch (Throwable e) {
+      logger.error("Error producing output", e);
       try {
         output(response,new EmptyResponseContext(500));
       } catch (Exception ex) {
+        logger.error("Error outputting error", ex);
         response.sendError(500);
       }
     } finally {



Mime
View raw message