You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ra...@apache.org on 2006/11/01 19:33:51 UTC

svn commit: r470025 - /incubator/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java

Author: rajdavies
Date: Wed Nov  1 10:33:50 2006
New Revision: 470025

URL: http://svn.apache.org/viewvc?view=rev&rev=470025
Log:
tidy up some of the error handling

Modified:
    incubator/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java

Modified: incubator/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java?view=diff&rev=470025&r1=470024&r2=470025
==============================================================================
--- incubator/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java (original)
+++ incubator/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java Wed Nov  1 10:33:50 2006
@@ -136,7 +136,7 @@
                 consumer.close();
             }
             catch (JMSException e) {
-                e.printStackTrace();
+                log.debug("caught exception closing consumer",e);
             }
         }
     }
@@ -148,7 +148,7 @@
                 connection.close();
         }
         catch (JMSException e) {
-            throw new RuntimeException(e);
+            log.debug("caught exception closing consumer",e);
         }
         finally {
             producer = null;
@@ -189,7 +189,11 @@
                     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;
+                    
                 }
             }
         }