You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2007/04/26 01:52:20 UTC
svn commit: r532540 -
/activemq/activemq-cpp/trunk/activemq-cpp/src/examples/main.cpp
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) {