abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r639308 - /incubator/abdera/java/branches/abdera-0.4.0-incubating/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractProvider.java
Date Thu, 20 Mar 2008 15:03:37 GMT
Author: jmsnell
Date: Thu Mar 20 08:03:32 2008
New Revision: 639308

URL: http://svn.apache.org/viewvc?rev=639308&view=rev
Log:
per https://issues.apache.org/jira/browse/ABDERA-132

"AbstractProvider.process() wraps all of its code in a "catch (Throwable e)", which returns
a 500 status and doesn't log the exception. "

This update logs the error but does not differentiate the various types of errors. We'll need
to figure that out for the next release.

Modified:
    incubator/abdera/java/branches/abdera-0.4.0-incubating/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractProvider.java

Modified: incubator/abdera/java/branches/abdera-0.4.0-incubating/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractProvider.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/branches/abdera-0.4.0-incubating/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractProvider.java?rev=639308&r1=639307&r2=639308&view=diff
==============================================================================
--- incubator/abdera/java/branches/abdera-0.4.0-incubating/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractProvider.java
(original)
+++ incubator/abdera/java/branches/abdera-0.4.0-incubating/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractProvider.java
Thu Mar 20 08:03:32 2008
@@ -46,6 +46,8 @@
 import org.apache.abdera.protocol.server.context.StreamWriterResponseContext;
 import org.apache.abdera.util.Constants;
 import org.apache.abdera.writer.StreamWriter;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * Base Provider implementation that provides the core implementation details 
@@ -54,6 +56,8 @@
 public abstract class AbstractProvider 
   implements Provider {
   
+  private final static Log log = LogFactory.getLog(AbstractProvider.class);
+  
   protected Abdera abdera;
   protected Map<String,String> properties;
   protected List<Filter> filters = new ArrayList<Filter>();
@@ -183,6 +187,7 @@
           response = ProviderHelper.notsupported(request);
         return response;
       } catch (Throwable e) {
+        log.error(e);
         if (transaction != null) 
           transaction.compensate(request,e);
         response = ProviderHelper.servererror(request, e);



Mime
View raw message