From c171817a749fdc9ea652c57237404d68bd77ff3e Mon Sep 17 00:00:00 2001 From: Robert Davies Date: Wed, 1 Nov 2006 18:33:50 +0000 Subject: [PATCH] tidy up some of the error handling git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@470025 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/activemq/web/WebClient.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java b/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java index 55035550fe..62c15f957a 100644 --- a/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java +++ b/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java @@ -136,7 +136,7 @@ public class WebClient implements HttpSessionActivationListener, HttpSessionBind consumer.close(); } catch (JMSException e) { - e.printStackTrace(); + log.debug("caught exception closing consumer",e); } } } @@ -148,7 +148,7 @@ public class WebClient implements HttpSessionActivationListener, HttpSessionBind connection.close(); } catch (JMSException e) { - throw new RuntimeException(e); + log.debug("caught exception closing consumer",e); } finally { producer = null; @@ -189,7 +189,11 @@ public class WebClient implements HttpSessionActivationListener, HttpSessionBind consumers.put(destination, getConsumer(destination, true)); } catch (JMSException e) { - e.printStackTrace(); // TODO better handling? + log.debug("Caought Exception ",e); + IOException ex = new IOException(e.getMessage()); + ex.initCause(e.getCause() != null ? e.getCause() : e); + throw ex; + } } }