activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bpmuser <brian.mckin...@nrc.ca>
Subject ActiveMq-Cpp initializeLibrary and CMSException what()
Date Tue, 20 Oct 2009 15:40:03 GMT

I was trying to debug an error related to not calling
activemq::library::ActiveMQCPP::initializeLibrary() (I can still find no
documentation on this. I'll try and update at least the example code. I
think it should be on the wiki. I'm new.) 

I was catching the exception as a std::exception and trying to use the
what() function to figure out the error.  All that was output was "unknown
exception".  I think it be okay to add:

CMSException.h:

        /**
         * Gets the cause of the error.
         *
         * @return const char pointer to error message
         */
        virtual const char * what() const;

CMSException.cpp:

////////////////////////////////////////////////////////////////////////////////
const char * CMSException::what() const {
	return this->data->message.c_str();
}

It should reasonable and it works on my system.  Any thoughts?

I'm not a dev, but I can try and sign up if needed.

Cheers,
Brian!

-- 
View this message in context: http://www.nabble.com/ActiveMq-Cpp-initializeLibrary-and-CMSException-what%28%29-tp25977480p25977480.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Mime
View raw message