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

remm 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 0aa0b9a8c9 Remove two instances of printStackTrace
0aa0b9a8c9 is described below

commit 0aa0b9a8c983a16bf8f63ccc98ed21d96f71424e
Author: remm <[email protected]>
AuthorDate: Tue Oct 3 12:28:16 2023 +0200

    Remove two instances of printStackTrace
---
 java/org/apache/catalina/manager/LocalStrings.properties   | 1 +
 java/org/apache/catalina/manager/StatusManagerServlet.java | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/manager/LocalStrings.properties 
b/java/org/apache/catalina/manager/LocalStrings.properties
index 09b6f51266..148833de19 100644
--- a/java/org/apache/catalina/manager/LocalStrings.properties
+++ b/java/org/apache/catalina/manager/LocalStrings.properties
@@ -129,6 +129,7 @@ managerServlet.deployed=OK - Deployed application at 
context path [{0}]
 managerServlet.deployedButNotStarted=FAIL - Deployed application at context 
path [{0}] but context failed to start
 managerServlet.error.deploy=Error deploying [{0}]
 managerServlet.error.idleParam=Could not parse integer idle parameter [{0}]
+managerServlet.error.jmx=JMX error
 managerServlet.error.reload=Error reloading [{0}]
 managerServlet.error.resources=Error displaying resources of type [{0}]
 managerServlet.error.serverInfo=Error displaying server information
diff --git a/java/org/apache/catalina/manager/StatusManagerServlet.java 
b/java/org/apache/catalina/manager/StatusManagerServlet.java
index d43e4337ee..ab6e8010ee 100644
--- a/java/org/apache/catalina/manager/StatusManagerServlet.java
+++ b/java/org/apache/catalina/manager/StatusManagerServlet.java
@@ -131,7 +131,7 @@ public class StatusManagerServlet extends HttpServlet 
implements NotificationLis
             mBeanServer.addNotificationListener(objectName, this, null, null);
 
         } catch (Exception e) {
-            e.printStackTrace();
+            log(sm.getString("managerServlet.error.jmx"), e);
         }
 
     }
@@ -150,7 +150,7 @@ public class StatusManagerServlet extends HttpServlet 
implements NotificationLis
             objectName = new ObjectName(onStr);
             mBeanServer.removeNotificationListener(objectName, this, null, 
null);
         } catch (Exception e) {
-            e.printStackTrace();
+            log(sm.getString("managerServlet.error.jmx"), e);
         }
 
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to