activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r470025 - /incubator/activemq/trunk/activemq-web/src/main/java/org/apache/activemq/web/WebClient.java
Date Wed, 01 Nov 2006 18:33:51 GMT
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;
+                    
                 }
             }
         }



Mime
View raw message