activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r757527 - /activemq/activemq-cpp/trunk/src/main/activemq/exceptions/BrokerException.h
Date Mon, 23 Mar 2009 20:12:00 GMT
Author: tabish
Date: Mon Mar 23 20:12:00 2009
New Revision: 757527

URL: http://svn.apache.org/viewvc?rev=757527&view=rev
Log:
Fix NullPointerException that was thrown if Exception from the broker had no set Cause.

Modified:
    activemq/activemq-cpp/trunk/src/main/activemq/exceptions/BrokerException.h

Modified: activemq/activemq-cpp/trunk/src/main/activemq/exceptions/BrokerException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/exceptions/BrokerException.h?rev=757527&r1=757526&r2=757527&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/exceptions/BrokerException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/exceptions/BrokerException.h Mon Mar 23
20:12:00 2009
@@ -60,7 +60,9 @@
             std::ostringstream ostream;
             ostream << "*** BEGIN SERVER-SIDE STACK TRACE ***" << std::endl;
             ostream << "Message: " << error->getMessage() << std::endl;
-            ostream << "Cause: " << error->getCause()->toString() <<
std::endl;
+            if( error->getCause() != NULL ) {
+                ostream << "Cause: " << error->getCause()->toString() <<
std::endl;
+            }
             ostream << "Exception Class " << error->getExceptionClass() <<
std::endl;
 
             for( std::size_t ix = 0; ix< error->getStackTraceElements().size(); ++ix
){



Mime
View raw message