This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
     new 0b4848acdd Don't overwrite the initial exception with any subsequent 
exception
0b4848acdd is described below

commit 0b4848acddac44944c07fe846e9b8046b53e7b59
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Feb 29 09:03:42 2024 +0000

    Don't overwrite the initial exception with any subsequent exception
---
 java/org/apache/coyote/Response.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/coyote/Response.java 
b/java/org/apache/coyote/Response.java
index 9e11308278..930f2c19e3 100644
--- a/java/org/apache/coyote/Response.java
+++ b/java/org/apache/coyote/Response.java
@@ -275,7 +275,9 @@ public final class Response {
      * @param ex The exception that occurred
      */
     public void setErrorException(Exception ex) {
-        errorException = ex;
+        if (errorException == null) {
+            errorException = ex;
+        }
     }
 
 


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

Reply via email to