tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r524836 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
Date Mon, 02 Apr 2007 16:51:30 GMT
Author: remm
Date: Mon Apr  2 09:51:29 2007
New Revision: 524836

URL: http://svn.apache.org/viewvc?view=rev&rev=524836
Log:
- If an exception is thrown processing an event which was not an error, the contract says
an ERROR event 
  should be called.

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?view=diff&rev=524836&r1=524835&r2=524836
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Mon Apr  2
09:51:29 2007
@@ -141,6 +141,14 @@
                 // Calling the container
                 connector.getContainer().getPipeline().getFirst().event(request, response,
request.getEvent());
 
+                if (!error && !response.isClosed() && (request.getAttribute(Globals.EXCEPTION_ATTR)
!= null)) {
+                    // An unexpected exception occurred while processing the event, so
+                    // error should be called
+                    request.getEvent().setEventType(CometEvent.EventType.ERROR);
+                    request.getEvent().setEventSubType(null);
+                    error = true;
+                    connector.getContainer().getPipeline().getFirst().event(request, response,
request.getEvent());
+                }
                 if (response.isClosed() || !request.isComet()) {
                     res.action(ActionCode.ACTION_COMET_END, null);
                 }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message