activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric van Gyzen (JIRA)" <j...@apache.org>
Subject [jira] Created: (AMQCPP-262) exception message in checkWriteOnlyBody is wrong
Date Fri, 25 Sep 2009 18:54:51 GMT
exception message in checkWriteOnlyBody is wrong
------------------------------------------------

                 Key: AMQCPP-262
                 URL: https://issues.apache.org/activemq/browse/AMQCPP-262
             Project: ActiveMQ C++ Client
          Issue Type: Bug
          Components: CMS Impl
            Reporter: Eric van Gyzen
            Assignee: Timothy Bish
            Priority: Trivial


In the checkWriteOnlyBody method of the ActiveMQBytesMessage and ActiveMQStreamMessage classes,
the message in the exception claims the opposite of reality.

Index: activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.cpp
===================================================================
--- activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.cpp    (revision 817354)
+++ activemq-cpp/src/main/activemq/commands/ActiveMQBytesMessage.cpp    (working copy)
@@ -70,8 +70,8 @@
     if( !this->isReadOnlyBody() ){
         throw exceptions::ActiveMQException(
             __FILE__, __LINE__,
-            "message is in read-only mode and "
-            "cannot be written to" ).convertToCMSException();
+            "message is in write-only mode and "
+            "cannot be read from" ).convertToCMSException();
     }
 }

Index: activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp
===================================================================
--- activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp   (revision 817354)
+++ activemq-cpp/src/main/activemq/commands/ActiveMQStreamMessage.cpp   (working copy)
@@ -90,8 +90,8 @@
     if( !this->isReadOnlyBody() ){
         throw exceptions::ActiveMQException(
             __FILE__, __LINE__,
-            "message is in read-only mode and "
-            "cannot be written to" ).convertToCMSException();
+            "message is in write-only mode and "
+            "cannot be read from" ).convertToCMSException();
     }
 }



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message