activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r532540 - /activemq/activemq-cpp/trunk/activemq-cpp/src/examples/main.cpp
Date Wed, 25 Apr 2007 23:52:20 GMT
Author: tabish
Date: Wed Apr 25 16:52:19 2007
New Revision: 532540

URL: http://svn.apache.org/viewvc?view=rev&rev=532540
Log:
Cleaning up

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/examples/main.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/examples/main.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/examples/main.cpp?view=diff&rev=532540&r1=532539&r2=532540
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/examples/main.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/examples/main.cpp Wed Apr 25 16:52:19 2007
@@ -230,7 +230,13 @@
             count++;
             const TextMessage* textMessage =
                 dynamic_cast< const TextMessage* >( message );
-            string text = textMessage->getText();
+            string text = "";
+
+            if( textMessage != NULL ) {
+                text = textMessage->getText();
+            } else {
+                text = "NOT A TEXTMESSAGE!";
+            }
 
             printf( "Message #%d Received: %s\n", count, text.c_str() );
         } catch (CMSException& e) {



Mime
View raw message