(tomcat) branch main updated: Always call ExceptionUtils.handleThrowable first in a catch block

[email protected] Mon, 20 Jul 2026 09:07:59 +0000
Newsgroups gmane.comp.jakarta.tomcat.devel
Message-ID <178453847952.3872471.15302616783914955147@gitbox3-he-fi.apache.org>
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/main by this push:
     new 96c5c551c8 Always call ExceptionUtils.handleThrowable first in a catch block
96c5c551c8 is described below

commit 96c5c551c8b817545fb64036c17681a54c81211d
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Jul 20 10:07:49 2026 +0100

    Always call ExceptionUtils.handleThrowable first in a catch block
---
 java/org/apache/catalina/users/DataSourceUserDatabase.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/users/DataSourceUserDatabase.java b/java/org/apache/catalina/users/DataSourceUserDatabase.java
index 9ed42574d5..2bbeb8c685 100644
--- a/java/org/apache/catalina/users/DataSourceUserDatabase.java
+++ b/java/org/apache/catalina/users/DataSourceUserDatabase.java
@@ -1247,8 +1247,8 @@ public class DataSourceUserDatabase extends SparseUserDatabase {
                 dbConnection.commit();
                 success = true;
             } catch (Throwable t) {
-                log.error(sm.getString("dataSourceUserDatabase.exception"), t);
                 ExceptionUtils.handleThrowable(t);
+                log.error(sm.getString("dataSourceUserDatabase.exception"), t);
                 // Some exception occurred so rollback everything
                 try {
                     dbConnection.rollback();