It's possible that an transport listener could generate a runtime exception while handling an exception. Add a handler for it so that we DEBUG log the event instead of letting

it propagate up which eventally kills the run thread and causes a System.err stack dump.



git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@818138 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2009-09-23 15:27:27 +00:00
parent 09f156456f
commit 5efe421cdc
1 changed files with 6 additions and 1 deletions

View File

@ -93,7 +93,12 @@ public abstract class TransportSupport extends ServiceSupport implements Transpo
*/
public void onException(IOException e) {
if (transportListener != null) {
transportListener.onException(e);
try {
transportListener.onException(e);
} catch (RuntimeException e2) {
// Handle any unexpected runtime exceptions by debug logging them.
LOG.debug("Unexpected runtime exception: "+e2, e2);
}
}
}