Author: ritchiem
Date: Tue Nov  7 04:23:43 2006
New Revision: 472081

URL: http://svn.apache.org/viewvc?view=rev&rev=472081
Log:
Added extra logging around InVM failures

Modified:
    
incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/client/transport/TransportConnection.java

Modified: 
incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/client/transport/TransportConnection.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/client/transport/TransportConnection.java?view=diff&rev=472081&r1=472080&r2=472081
==============================================================================
--- 
incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/client/transport/TransportConnection.java
 (original)
+++ 
incubator/qpid/trunk/qpid/java/client/src/org/apache/qpid/client/transport/TransportConnection.java
 Tue Nov  7 04:23:43 2006
@@ -219,7 +219,18 @@
                 {
                     _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 @@
             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


Reply via email to