diff options
| author | Martin Ritchie <ritchiem@apache.org> | 2006-11-07 12:23:43 +0000 |
|---|---|---|
| committer | Martin Ritchie <ritchiem@apache.org> | 2006-11-07 12:23:43 +0000 |
| commit | 0cbc826d8029dc9e1743fddd4788f5c4cdb43251 (patch) | |
| tree | 2e5922cf65f402d1f203f0e066e875eb83b53d0b /qpid/java/client | |
| parent | ad3443cd0caaeb80934c26ebe2ab65e8c8029579 (diff) | |
| download | qpid-python-0cbc826d8029dc9e1743fddd4788f5c4cdb43251.tar.gz | |
Added extra logging around InVM failures
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@472081 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/client')
| -rw-r--r-- | qpid/java/client/src/org/apache/qpid/client/transport/TransportConnection.java | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/qpid/java/client/src/org/apache/qpid/client/transport/TransportConnection.java b/qpid/java/client/src/org/apache/qpid/client/transport/TransportConnection.java index c935ff0ad0..a7ca3ffc3c 100644 --- a/qpid/java/client/src/org/apache/qpid/client/transport/TransportConnection.java +++ b/qpid/java/client/src/org/apache/qpid/client/transport/TransportConnection.java @@ -219,7 +219,18 @@ public class TransportConnection { _logger.info("Unable to create InVM Qpid.AMQP on port " + port + ". Because: " + e.getCause()); _logger.error(e); - throw new AMQVMBrokerCreationException(port, e.getCause() + " Stopped InVM Qpid.AMQP creation"); + String because; + if (e.getCause() == null) + { + because = e.toString(); + } + else + { + because = e.getCause().toString(); + } + + + throw new AMQVMBrokerCreationException(port, because + " Stopped InVM Qpid.AMQP creation"); } _acceptor.bind(pipe, provider); @@ -230,7 +241,18 @@ public class TransportConnection catch (IOException e) { _logger.error(e); - throw new AMQVMBrokerCreationException(port, e.getCause() + " Stopped binding of InVM Qpid.AMQP"); + + String because; + if (e.getCause() == null) + { + because = e.toString(); + } + else + { + because = e.getCause().toString(); + } + + throw new AMQVMBrokerCreationException(port, because + " Stopped binding of InVM Qpid.AMQP"); } } else |
