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
This commit is contained in:
Robert Davies 2006-11-01 18:33:50 +00:00
parent d01965af0b
commit c171817a74
1 changed files with 7 additions and 3 deletions

View File

@ -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;
}
}
}