activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r510313 [2/5] - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/
Date Wed, 21 Feb 2007 23:41:54 GMT
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConnectionControlMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConnectionControlMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConnectionControlMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConnectionControlMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,69 +48,99 @@
 ///////////////////////////////////////////////////////////////////////////////
 void ConnectionControlMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
-    ConnectionControl* info =
-        dynamic_cast<ConnectionControl*>( dataStructure );
-    info->setClose( bs->readBoolean() );
-    info->setExit( bs->readBoolean() );
-    info->setFaultTolerant( bs->readBoolean() );
-    info->setResume( bs->readBoolean() );
-    info->setSuspend( bs->readBoolean() );
+        BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+        ConnectionControl* info =
+            dynamic_cast<ConnectionControl*>( dataStructure );
+        info->setClose( bs->readBoolean() );
+        info->setExit( bs->readBoolean() );
+        info->setFaultTolerant( bs->readBoolean() );
+        info->setResume( bs->readBoolean() );
+        info->setSuspend( bs->readBoolean() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int ConnectionControlMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    ConnectionControl* info =
-        dynamic_cast<ConnectionControl*>( dataStructure );
+    try {
 
-    int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
-    bs->writeBoolean( info->isClose() );
-    bs->writeBoolean( info->isExit() );
-    bs->writeBoolean( info->isFaultTolerant() );
-    bs->writeBoolean( info->isResume() );
-    bs->writeBoolean( info->isSuspend() );
+        ConnectionControl* info =
+            dynamic_cast<ConnectionControl*>( dataStructure );
 
-    return rc + 0;
+        int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+        bs->writeBoolean( info->isClose() );
+        bs->writeBoolean( info->isExit() );
+        bs->writeBoolean( info->isFaultTolerant() );
+        bs->writeBoolean( info->isResume() );
+        bs->writeBoolean( info->isSuspend() );
+
+        return rc + 0;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ConnectionControlMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+    try {
+
+        BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
 
-    bs->readBoolean();
-    bs->readBoolean();
-    bs->readBoolean();
-    bs->readBoolean();
-    bs->readBoolean();
+        bs->readBoolean();
+        bs->readBoolean();
+        bs->readBoolean();
+        bs->readBoolean();
+        bs->readBoolean();
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ConnectionControlMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
-    ConnectionControl* info =
-        dynamic_cast<ConnectionControl*>( dataStructure );
-    info->setClose( dataIn->readBoolean() );
-    info->setExit( dataIn->readBoolean() );
-    info->setFaultTolerant( dataIn->readBoolean() );
-    info->setResume( dataIn->readBoolean() );
-    info->setSuspend( dataIn->readBoolean() );
+    try {
+
+        BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        ConnectionControl* info =
+            dynamic_cast<ConnectionControl*>( dataStructure );
+        info->setClose( dataIn->readBoolean() );
+        info->setExit( dataIn->readBoolean() );
+        info->setFaultTolerant( dataIn->readBoolean() );
+        info->setResume( dataIn->readBoolean() );
+        info->setSuspend( dataIn->readBoolean() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ConnectionControlMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    ConnectionControl* info =
-        dynamic_cast<ConnectionControl*>( dataStructure );
-    BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
-
-    dataOut->writeBoolean( info->isClose() );
-    dataOut->writeBoolean( info->isExit() );
-    dataOut->writeBoolean( info->isFaultTolerant() );
-    dataOut->writeBoolean( info->isResume() );
-    dataOut->writeBoolean( info->isSuspend() );
+    try {
+
+        ConnectionControl* info =
+            dynamic_cast<ConnectionControl*>( dataStructure );
+         BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+        dataOut->writeBoolean( info->isClose() );
+        dataOut->writeBoolean( info->isExit() );
+        dataOut->writeBoolean( info->isFaultTolerant() );
+        dataOut->writeBoolean( info->isResume() );
+        dataOut->writeBoolean( info->isSuspend() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConnectionErrorMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConnectionErrorMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConnectionErrorMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConnectionErrorMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,60 +48,90 @@
 ///////////////////////////////////////////////////////////////////////////////
 void ConnectionErrorMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
-    ConnectionError* info =
-        dynamic_cast<ConnectionError*>( dataStructure );
-    info->setException( dynamic_cast< BrokerError* >(
-        tightUnmarshalBrokerError( wireFormat, dataIn, bs ) ) );
-    info->setConnectionId( dynamic_cast< ConnectionId* >(
-        tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
+        BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+        ConnectionError* info =
+            dynamic_cast<ConnectionError*>( dataStructure );
+        info->setException( dynamic_cast< BrokerError* >(
+            tightUnmarshalBrokerError( wireFormat, dataIn, bs ) ) );
+        info->setConnectionId( dynamic_cast< ConnectionId* >(
+            tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int ConnectionErrorMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    ConnectionError* info =
-        dynamic_cast<ConnectionError*>( dataStructure );
+    try {
 
-    int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
-    rc += tightMarshalBrokerError1( wireFormat, info->getException(), bs );
-    rc += tightMarshalNestedObject1( wireFormat, info->getConnectionId(), bs );
+        ConnectionError* info =
+            dynamic_cast<ConnectionError*>( dataStructure );
 
-    return rc + 0;
+        int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+        rc += tightMarshalBrokerError1( wireFormat, info->getException(), bs );
+        rc += tightMarshalNestedObject1( wireFormat, info->getConnectionId(), bs );
+
+        return rc + 0;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ConnectionErrorMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+    try {
+
+        BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
 
-    ConnectionError* info =
-        dynamic_cast<ConnectionError*>( dataStructure );
-    tightMarshalBrokerError2( wireFormat, info->getException(), dataOut, bs );
-    tightMarshalNestedObject2( wireFormat, info->getConnectionId(), dataOut, bs );
+        ConnectionError* info =
+            dynamic_cast<ConnectionError*>( dataStructure );
+        tightMarshalBrokerError2( wireFormat, info->getException(), dataOut, bs );
+        tightMarshalNestedObject2( wireFormat, info->getConnectionId(), dataOut, bs );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ConnectionErrorMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
-    ConnectionError* info =
-        dynamic_cast<ConnectionError*>( dataStructure );
-    info->setException( dynamic_cast< BrokerError* >(
-        looseUnmarshalBrokerError( wireFormat, dataIn ) ) );
-    info->setConnectionId( dynamic_cast< ConnectionId* >( 
-        looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+    try {
+
+        BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        ConnectionError* info =
+            dynamic_cast<ConnectionError*>( dataStructure );
+        info->setException( dynamic_cast< BrokerError* >(
+            looseUnmarshalBrokerError( wireFormat, dataIn ) ) );
+        info->setConnectionId( dynamic_cast< ConnectionId* >( 
+            looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ConnectionErrorMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    ConnectionError* info =
-        dynamic_cast<ConnectionError*>( dataStructure );
-    BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+    try {
 
-    looseMarshalBrokerError( wireFormat, info->getException(), dataOut );
-    looseMarshalNestedObject( wireFormat, info->getConnectionId(), dataOut );
+        ConnectionError* info =
+            dynamic_cast<ConnectionError*>( dataStructure );
+         BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+        looseMarshalBrokerError( wireFormat, info->getException(), dataOut );
+        looseMarshalNestedObject( wireFormat, info->getConnectionId(), dataOut );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConnectionIdMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConnectionIdMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConnectionIdMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConnectionIdMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,51 +48,81 @@
 ///////////////////////////////////////////////////////////////////////////////
 void ConnectionIdMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
-    ConnectionId* info =
-        dynamic_cast<ConnectionId*>( dataStructure );
-    info->setValue( tightUnmarshalString( dataIn, bs ) );
+        BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+        ConnectionId* info =
+            dynamic_cast<ConnectionId*>( dataStructure );
+        info->setValue( tightUnmarshalString( dataIn, bs ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int ConnectionIdMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    ConnectionId* info =
-        dynamic_cast<ConnectionId*>( dataStructure );
+    try {
+
+        ConnectionId* info =
+            dynamic_cast<ConnectionId*>( dataStructure );
 
-    int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
-    rc += tightMarshalString1( info->getValue(), bs );
+        int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+        rc += tightMarshalString1( info->getValue(), bs );
 
-    return rc + 0;
+        return rc + 0;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ConnectionIdMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+    try {
 
-    ConnectionId* info =
-        dynamic_cast<ConnectionId*>( dataStructure );
-    tightMarshalString2( info->getValue(), dataOut, bs );
+        BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+
+        ConnectionId* info =
+            dynamic_cast<ConnectionId*>( dataStructure );
+        tightMarshalString2( info->getValue(), dataOut, bs );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ConnectionIdMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
-    ConnectionId* info =
-        dynamic_cast<ConnectionId*>( dataStructure );
-    info->setValue( looseUnmarshalString( dataIn ) );
+    try {
+
+        BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        ConnectionId* info =
+            dynamic_cast<ConnectionId*>( dataStructure );
+        info->setValue( looseUnmarshalString( dataIn ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ConnectionIdMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    ConnectionId* info =
-        dynamic_cast<ConnectionId*>( dataStructure );
-    BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+    try {
 
-    looseMarshalString( info->getValue(), dataOut );
+        ConnectionId* info =
+            dynamic_cast<ConnectionId*>( dataStructure );
+         BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+        looseMarshalString( info->getValue(), dataOut );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConnectionInfoMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConnectionInfoMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConnectionInfoMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConnectionInfoMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,110 +48,140 @@
 ///////////////////////////////////////////////////////////////////////////////
 void ConnectionInfoMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
-    ConnectionInfo* info =
-        dynamic_cast<ConnectionInfo*>( dataStructure );
-    info->setConnectionId( dynamic_cast< ConnectionId* >(
-        tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
-    info->setClientId( tightUnmarshalString( dataIn, bs ) );
-    info->setPassword( tightUnmarshalString( dataIn, bs ) );
-    info->setUserName( tightUnmarshalString( dataIn, bs ) );
-
-    if( bs->readBoolean() ) {
-        short size = dataIn->readShort();
-        info->getBrokerPath().reserve( size );
-        for( int i = 0; i < size; i++ ) {
-            info->getBrokerPath().push_back( dynamic_cast< BrokerId* >(
-                tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
+        BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+        ConnectionInfo* info =
+            dynamic_cast<ConnectionInfo*>( dataStructure );
+        info->setConnectionId( dynamic_cast< ConnectionId* >(
+            tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
+        info->setClientId( tightUnmarshalString( dataIn, bs ) );
+        info->setPassword( tightUnmarshalString( dataIn, bs ) );
+        info->setUserName( tightUnmarshalString( dataIn, bs ) );
+
+        if( bs->readBoolean() ) {
+            short size = dataIn->readShort();
+            info->getBrokerPath().reserve( size );
+            for( int i = 0; i < size; i++ ) {
+                info->getBrokerPath().push_back( dynamic_cast< BrokerId* >(
+                    tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
+            }
         }
+        else {
+            info->getBrokerPath().clear();
+        }
+        info->setBrokerMasterConnector( bs->readBoolean() );
+        info->setManageable( bs->readBoolean() );
+        info->setClientMaster( bs->readBoolean() );
     }
-    else {
-        info->getBrokerPath().clear();
-    }
-    info->setBrokerMasterConnector( bs->readBoolean() );
-    info->setManageable( bs->readBoolean() );
-    info->setClientMaster( bs->readBoolean() );
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int ConnectionInfoMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    ConnectionInfo* info =
-        dynamic_cast<ConnectionInfo*>( dataStructure );
+    try {
 
-    int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
-    rc += tightMarshalCachedObject1( wireFormat, info->getConnectionId(), bs );
-    rc += tightMarshalString1( info->getClientId(), bs );
-    rc += tightMarshalString1( info->getPassword(), bs );
-    rc += tightMarshalString1( info->getUserName(), bs );
-    rc += tightMarshalObjectArray1( wireFormat, info->getBrokerPath(), bs );
-    bs->writeBoolean( info->isBrokerMasterConnector() );
-    bs->writeBoolean( info->isManageable() );
-    bs->writeBoolean( info->isClientMaster() );
+        ConnectionInfo* info =
+            dynamic_cast<ConnectionInfo*>( dataStructure );
 
-    return rc + 0;
+        int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+        rc += tightMarshalCachedObject1( wireFormat, info->getConnectionId(), bs );
+        rc += tightMarshalString1( info->getClientId(), bs );
+        rc += tightMarshalString1( info->getPassword(), bs );
+        rc += tightMarshalString1( info->getUserName(), bs );
+        rc += tightMarshalObjectArray1( wireFormat, info->getBrokerPath(), bs );
+        bs->writeBoolean( info->isBrokerMasterConnector() );
+        bs->writeBoolean( info->isManageable() );
+        bs->writeBoolean( info->isClientMaster() );
+
+        return rc + 0;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ConnectionInfoMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+    try {
+
+        BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
 
-    ConnectionInfo* info =
-        dynamic_cast<ConnectionInfo*>( dataStructure );
-    tightMarshalCachedObject2( wireFormat, info->getConnectionId(), dataOut, bs );
-    tightMarshalString2( info->getClientId(), dataOut, bs );
-    tightMarshalString2( info->getPassword(), dataOut, bs );
-    tightMarshalString2( info->getUserName(), dataOut, bs );
-    tightMarshalObjectArray2( wireFormat, info->getBrokerPath(), dataOut, bs );
-    bs->readBoolean();
-    bs->readBoolean();
-    bs->readBoolean();
+        ConnectionInfo* info =
+            dynamic_cast<ConnectionInfo*>( dataStructure );
+        tightMarshalCachedObject2( wireFormat, info->getConnectionId(), dataOut, bs );
+        tightMarshalString2( info->getClientId(), dataOut, bs );
+        tightMarshalString2( info->getPassword(), dataOut, bs );
+        tightMarshalString2( info->getUserName(), dataOut, bs );
+        tightMarshalObjectArray2( wireFormat, info->getBrokerPath(), dataOut, bs );
+        bs->readBoolean();
+        bs->readBoolean();
+        bs->readBoolean();
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ConnectionInfoMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
-    ConnectionInfo* info =
-        dynamic_cast<ConnectionInfo*>( dataStructure );
-    info->setConnectionId( dynamic_cast< ConnectionId* >( 
-        looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
-    info->setClientId( looseUnmarshalString( dataIn ) );
-    info->setPassword( looseUnmarshalString( dataIn ) );
-    info->setUserName( looseUnmarshalString( dataIn ) );
-
-    if( dataIn->readBoolean() ) {
-        short size = dataIn->readShort();
-        info->getBrokerPath().reserve( size );
-        for( int i = 0; i < size; i++ ) {
-            info->getBrokerPath().push_back( dynamic_cast<BrokerId* >(
-                looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+    try {
+
+        BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        ConnectionInfo* info =
+            dynamic_cast<ConnectionInfo*>( dataStructure );
+        info->setConnectionId( dynamic_cast< ConnectionId* >( 
+            looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+        info->setClientId( looseUnmarshalString( dataIn ) );
+        info->setPassword( looseUnmarshalString( dataIn ) );
+        info->setUserName( looseUnmarshalString( dataIn ) );
+
+        if( dataIn->readBoolean() ) {
+            short size = dataIn->readShort();
+            info->getBrokerPath().reserve( size );
+            for( int i = 0; i < size; i++ ) {
+                info->getBrokerPath().push_back( dynamic_cast<BrokerId* >(
+                    looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+            }
         }
+        else {
+            info->getBrokerPath().clear();
+        }
+        info->setBrokerMasterConnector( dataIn->readBoolean() );
+        info->setManageable( dataIn->readBoolean() );
+        info->setClientMaster( dataIn->readBoolean() );
     }
-    else {
-        info->getBrokerPath().clear();
-    }
-    info->setBrokerMasterConnector( dataIn->readBoolean() );
-    info->setManageable( dataIn->readBoolean() );
-    info->setClientMaster( dataIn->readBoolean() );
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ConnectionInfoMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    ConnectionInfo* info =
-        dynamic_cast<ConnectionInfo*>( dataStructure );
-    BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
-
-    looseMarshalCachedObject( wireFormat, info->getConnectionId(), dataOut );
-    looseMarshalString( info->getClientId(), dataOut );
-    looseMarshalString( info->getPassword(), dataOut );
-    looseMarshalString( info->getUserName(), dataOut );
-    looseMarshalObjectArray( wireFormat, info->getBrokerPath(), dataOut );
-    dataOut->writeBoolean( info->isBrokerMasterConnector() );
-    dataOut->writeBoolean( info->isManageable() );
-    dataOut->writeBoolean( info->isClientMaster() );
+    try {
+
+        ConnectionInfo* info =
+            dynamic_cast<ConnectionInfo*>( dataStructure );
+         BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+        looseMarshalCachedObject( wireFormat, info->getConnectionId(), dataOut );
+        looseMarshalString( info->getClientId(), dataOut );
+        looseMarshalString( info->getPassword(), dataOut );
+        looseMarshalString( info->getUserName(), dataOut );
+        looseMarshalObjectArray( wireFormat, info->getBrokerPath(), dataOut );
+        dataOut->writeBoolean( info->isBrokerMasterConnector() );
+        dataOut->writeBoolean( info->isManageable() );
+        dataOut->writeBoolean( info->isClientMaster() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConsumerControlMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConsumerControlMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConsumerControlMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConsumerControlMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,77 +48,107 @@
 ///////////////////////////////////////////////////////////////////////////////
 void ConsumerControlMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
-    ConsumerControl* info =
-        dynamic_cast<ConsumerControl*>( dataStructure );
-    info->setClose( bs->readBoolean() );
-    info->setConsumerId( dynamic_cast< ConsumerId* >(
-        tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
-    info->setPrefetch( dataIn->readInt() );
-    info->setFlush( bs->readBoolean() );
-    info->setStart( bs->readBoolean() );
-    info->setStop( bs->readBoolean() );
+        BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+        ConsumerControl* info =
+            dynamic_cast<ConsumerControl*>( dataStructure );
+        info->setClose( bs->readBoolean() );
+        info->setConsumerId( dynamic_cast< ConsumerId* >(
+            tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
+        info->setPrefetch( dataIn->readInt() );
+        info->setFlush( bs->readBoolean() );
+        info->setStart( bs->readBoolean() );
+        info->setStop( bs->readBoolean() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int ConsumerControlMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    ConsumerControl* info =
-        dynamic_cast<ConsumerControl*>( dataStructure );
+    try {
 
-    int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
-    bs->writeBoolean( info->isClose() );
-    rc += tightMarshalNestedObject1( wireFormat, info->getConsumerId(), bs );
-    bs->writeBoolean( info->isFlush() );
-    bs->writeBoolean( info->isStart() );
-    bs->writeBoolean( info->isStop() );
+        ConsumerControl* info =
+            dynamic_cast<ConsumerControl*>( dataStructure );
 
-    return rc + 4;
+        int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+        bs->writeBoolean( info->isClose() );
+        rc += tightMarshalNestedObject1( wireFormat, info->getConsumerId(), bs );
+        bs->writeBoolean( info->isFlush() );
+        bs->writeBoolean( info->isStart() );
+        bs->writeBoolean( info->isStop() );
+
+        return rc + 4;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ConsumerControlMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+    try {
+
+        BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
 
-    ConsumerControl* info =
-        dynamic_cast<ConsumerControl*>( dataStructure );
-    bs->readBoolean();
-    tightMarshalNestedObject2( wireFormat, info->getConsumerId(), dataOut, bs );
-    dataOut->writeInt( info->getPrefetch() );
-    bs->readBoolean();
-    bs->readBoolean();
-    bs->readBoolean();
+        ConsumerControl* info =
+            dynamic_cast<ConsumerControl*>( dataStructure );
+        bs->readBoolean();
+        tightMarshalNestedObject2( wireFormat, info->getConsumerId(), dataOut, bs );
+        dataOut->writeInt( info->getPrefetch() );
+        bs->readBoolean();
+        bs->readBoolean();
+        bs->readBoolean();
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ConsumerControlMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
-    ConsumerControl* info =
-        dynamic_cast<ConsumerControl*>( dataStructure );
-    info->setClose( dataIn->readBoolean() );
-    info->setConsumerId( dynamic_cast< ConsumerId* >( 
-        looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
-    info->setPrefetch( dataIn->readInt() );
-    info->setFlush( dataIn->readBoolean() );
-    info->setStart( dataIn->readBoolean() );
-    info->setStop( dataIn->readBoolean() );
+    try {
+
+        BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        ConsumerControl* info =
+            dynamic_cast<ConsumerControl*>( dataStructure );
+        info->setClose( dataIn->readBoolean() );
+        info->setConsumerId( dynamic_cast< ConsumerId* >( 
+            looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+        info->setPrefetch( dataIn->readInt() );
+        info->setFlush( dataIn->readBoolean() );
+        info->setStart( dataIn->readBoolean() );
+        info->setStop( dataIn->readBoolean() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ConsumerControlMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    ConsumerControl* info =
-        dynamic_cast<ConsumerControl*>( dataStructure );
-    BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
-
-    dataOut->writeBoolean( info->isClose() );
-    looseMarshalNestedObject( wireFormat, info->getConsumerId(), dataOut );
-    dataOut->writeInt( info->getPrefetch() );
-    dataOut->writeBoolean( info->isFlush() );
-    dataOut->writeBoolean( info->isStart() );
-    dataOut->writeBoolean( info->isStop() );
+    try {
+
+        ConsumerControl* info =
+            dynamic_cast<ConsumerControl*>( dataStructure );
+         BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+        dataOut->writeBoolean( info->isClose() );
+        looseMarshalNestedObject( wireFormat, info->getConsumerId(), dataOut );
+        dataOut->writeInt( info->getPrefetch() );
+        dataOut->writeBoolean( info->isFlush() );
+        dataOut->writeBoolean( info->isStart() );
+        dataOut->writeBoolean( info->isStop() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConsumerIdMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConsumerIdMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConsumerIdMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConsumerIdMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,61 +48,91 @@
 ///////////////////////////////////////////////////////////////////////////////
 void ConsumerIdMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
-    ConsumerId* info =
-        dynamic_cast<ConsumerId*>( dataStructure );
-    info->setConnectionId( tightUnmarshalString( dataIn, bs ) );
-    info->setSessionId( tightUnmarshalLong( wireFormat, dataIn, bs ) );
-    info->setValue( tightUnmarshalLong( wireFormat, dataIn, bs ) );
+        BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+        ConsumerId* info =
+            dynamic_cast<ConsumerId*>( dataStructure );
+        info->setConnectionId( tightUnmarshalString( dataIn, bs ) );
+        info->setSessionId( tightUnmarshalLong( wireFormat, dataIn, bs ) );
+        info->setValue( tightUnmarshalLong( wireFormat, dataIn, bs ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int ConsumerIdMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    ConsumerId* info =
-        dynamic_cast<ConsumerId*>( dataStructure );
+    try {
 
-    int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
-    rc += tightMarshalString1( info->getConnectionId(), bs );
-    rc += tightMarshalLong1( wireFormat, info->getSessionId(), bs );
-    rc += tightMarshalLong1( wireFormat, info->getValue(), bs );
+        ConsumerId* info =
+            dynamic_cast<ConsumerId*>( dataStructure );
 
-    return rc + 0;
+        int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+        rc += tightMarshalString1( info->getConnectionId(), bs );
+        rc += tightMarshalLong1( wireFormat, info->getSessionId(), bs );
+        rc += tightMarshalLong1( wireFormat, info->getValue(), bs );
+
+        return rc + 0;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ConsumerIdMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+    try {
+
+        BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
 
-    ConsumerId* info =
-        dynamic_cast<ConsumerId*>( dataStructure );
-    tightMarshalString2( info->getConnectionId(), dataOut, bs );
-    tightMarshalLong2( wireFormat, info->getSessionId(), dataOut, bs );
-    tightMarshalLong2( wireFormat, info->getValue(), dataOut, bs );
+        ConsumerId* info =
+            dynamic_cast<ConsumerId*>( dataStructure );
+        tightMarshalString2( info->getConnectionId(), dataOut, bs );
+        tightMarshalLong2( wireFormat, info->getSessionId(), dataOut, bs );
+        tightMarshalLong2( wireFormat, info->getValue(), dataOut, bs );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ConsumerIdMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
-    ConsumerId* info =
-        dynamic_cast<ConsumerId*>( dataStructure );
-    info->setConnectionId( looseUnmarshalString( dataIn ) );
-    info->setSessionId( looseUnmarshalLong( wireFormat, dataIn ) );
-    info->setValue( looseUnmarshalLong( wireFormat, dataIn ) );
+    try {
+
+        BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        ConsumerId* info =
+            dynamic_cast<ConsumerId*>( dataStructure );
+        info->setConnectionId( looseUnmarshalString( dataIn ) );
+        info->setSessionId( looseUnmarshalLong( wireFormat, dataIn ) );
+        info->setValue( looseUnmarshalLong( wireFormat, dataIn ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ConsumerIdMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    ConsumerId* info =
-        dynamic_cast<ConsumerId*>( dataStructure );
-    BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
-
-    looseMarshalString( info->getConnectionId(), dataOut );
-    looseMarshalLong( wireFormat, info->getSessionId(), dataOut );
-    looseMarshalLong( wireFormat, info->getValue(), dataOut );
+    try {
+
+        ConsumerId* info =
+            dynamic_cast<ConsumerId*>( dataStructure );
+         BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+        looseMarshalString( info->getConnectionId(), dataOut );
+        looseMarshalLong( wireFormat, info->getSessionId(), dataOut );
+        looseMarshalLong( wireFormat, info->getValue(), dataOut );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConsumerInfoMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConsumerInfoMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConsumerInfoMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ConsumerInfoMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,156 +48,186 @@
 ///////////////////////////////////////////////////////////////////////////////
 void ConsumerInfoMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
-    ConsumerInfo* info =
-        dynamic_cast<ConsumerInfo*>( dataStructure );
-    info->setConsumerId( dynamic_cast< ConsumerId* >(
-        tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
-    info->setBrowser( bs->readBoolean() );
-    info->setDestination( dynamic_cast< ActiveMQDestination* >(
-        tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
-    info->setPrefetchSize( dataIn->readInt() );
-    info->setMaximumPendingMessageLimit( dataIn->readInt() );
-    info->setDispatchAsync( bs->readBoolean() );
-    info->setSelector( tightUnmarshalString( dataIn, bs ) );
-    info->setSubscriptionName( tightUnmarshalString( dataIn, bs ) );
-    info->setNoLocal( bs->readBoolean() );
-    info->setExclusive( bs->readBoolean() );
-    info->setRetroactive( bs->readBoolean() );
-    info->setPriority( dataIn->readByte() );
-
-    if( bs->readBoolean() ) {
-        short size = dataIn->readShort();
-        info->getBrokerPath().reserve( size );
-        for( int i = 0; i < size; i++ ) {
-            info->getBrokerPath().push_back( dynamic_cast< BrokerId* >(
-                tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
+        BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+        ConsumerInfo* info =
+            dynamic_cast<ConsumerInfo*>( dataStructure );
+        info->setConsumerId( dynamic_cast< ConsumerId* >(
+            tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
+        info->setBrowser( bs->readBoolean() );
+        info->setDestination( dynamic_cast< ActiveMQDestination* >(
+            tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
+        info->setPrefetchSize( dataIn->readInt() );
+        info->setMaximumPendingMessageLimit( dataIn->readInt() );
+        info->setDispatchAsync( bs->readBoolean() );
+        info->setSelector( tightUnmarshalString( dataIn, bs ) );
+        info->setSubscriptionName( tightUnmarshalString( dataIn, bs ) );
+        info->setNoLocal( bs->readBoolean() );
+        info->setExclusive( bs->readBoolean() );
+        info->setRetroactive( bs->readBoolean() );
+        info->setPriority( dataIn->readByte() );
+
+        if( bs->readBoolean() ) {
+            short size = dataIn->readShort();
+            info->getBrokerPath().reserve( size );
+            for( int i = 0; i < size; i++ ) {
+                info->getBrokerPath().push_back( dynamic_cast< BrokerId* >(
+                    tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
+            }
         }
+        else {
+            info->getBrokerPath().clear();
+        }
+        info->setAdditionalPredicate( dynamic_cast< BooleanExpression* >(
+            tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
+        info->setNetworkSubscription( bs->readBoolean() );
+        info->setOptimizedAcknowledge( bs->readBoolean() );
+        info->setNoRangeAcks( bs->readBoolean() );
     }
-    else {
-        info->getBrokerPath().clear();
-    }
-    info->setAdditionalPredicate( dynamic_cast< BooleanExpression* >(
-        tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
-    info->setNetworkSubscription( bs->readBoolean() );
-    info->setOptimizedAcknowledge( bs->readBoolean() );
-    info->setNoRangeAcks( bs->readBoolean() );
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int ConsumerInfoMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    ConsumerInfo* info =
-        dynamic_cast<ConsumerInfo*>( dataStructure );
+    try {
 
-    int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
-    rc += tightMarshalCachedObject1( wireFormat, info->getConsumerId(), bs );
-    bs->writeBoolean( info->isBrowser() );
-    rc += tightMarshalCachedObject1( wireFormat, info->getDestination(), bs );
-    bs->writeBoolean( info->isDispatchAsync() );
-    rc += tightMarshalString1( info->getSelector(), bs );
-    rc += tightMarshalString1( info->getSubscriptionName(), bs );
-    bs->writeBoolean( info->isNoLocal() );
-    bs->writeBoolean( info->isExclusive() );
-    bs->writeBoolean( info->isRetroactive() );
-    rc += tightMarshalObjectArray1( wireFormat, info->getBrokerPath(), bs );
-    rc += tightMarshalNestedObject1( wireFormat, info->getAdditionalPredicate(), bs );
-    bs->writeBoolean( info->isNetworkSubscription() );
-    bs->writeBoolean( info->isOptimizedAcknowledge() );
-    bs->writeBoolean( info->isNoRangeAcks() );
+        ConsumerInfo* info =
+            dynamic_cast<ConsumerInfo*>( dataStructure );
 
-    return rc + 9;
+        int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+        rc += tightMarshalCachedObject1( wireFormat, info->getConsumerId(), bs );
+        bs->writeBoolean( info->isBrowser() );
+        rc += tightMarshalCachedObject1( wireFormat, info->getDestination(), bs );
+        bs->writeBoolean( info->isDispatchAsync() );
+        rc += tightMarshalString1( info->getSelector(), bs );
+        rc += tightMarshalString1( info->getSubscriptionName(), bs );
+        bs->writeBoolean( info->isNoLocal() );
+        bs->writeBoolean( info->isExclusive() );
+        bs->writeBoolean( info->isRetroactive() );
+        rc += tightMarshalObjectArray1( wireFormat, info->getBrokerPath(), bs );
+        rc += tightMarshalNestedObject1( wireFormat, info->getAdditionalPredicate(), bs );
+        bs->writeBoolean( info->isNetworkSubscription() );
+        bs->writeBoolean( info->isOptimizedAcknowledge() );
+        bs->writeBoolean( info->isNoRangeAcks() );
+
+        return rc + 9;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ConsumerInfoMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+    try {
+
+        BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
 
-    ConsumerInfo* info =
-        dynamic_cast<ConsumerInfo*>( dataStructure );
-    tightMarshalCachedObject2( wireFormat, info->getConsumerId(), dataOut, bs );
-    bs->readBoolean();
-    tightMarshalCachedObject2( wireFormat, info->getDestination(), dataOut, bs );
-    dataOut->writeInt( info->getPrefetchSize() );
-    dataOut->writeInt( info->getMaximumPendingMessageLimit() );
-    bs->readBoolean();
-    tightMarshalString2( info->getSelector(), dataOut, bs );
-    tightMarshalString2( info->getSubscriptionName(), dataOut, bs );
-    bs->readBoolean();
-    bs->readBoolean();
-    bs->readBoolean();
-    dataOut->write( info->getPriority() );
-    tightMarshalObjectArray2( wireFormat, info->getBrokerPath(), dataOut, bs );
-    tightMarshalNestedObject2( wireFormat, info->getAdditionalPredicate(), dataOut, bs );
-    bs->readBoolean();
-    bs->readBoolean();
-    bs->readBoolean();
+        ConsumerInfo* info =
+            dynamic_cast<ConsumerInfo*>( dataStructure );
+        tightMarshalCachedObject2( wireFormat, info->getConsumerId(), dataOut, bs );
+        bs->readBoolean();
+        tightMarshalCachedObject2( wireFormat, info->getDestination(), dataOut, bs );
+        dataOut->writeInt( info->getPrefetchSize() );
+        dataOut->writeInt( info->getMaximumPendingMessageLimit() );
+        bs->readBoolean();
+        tightMarshalString2( info->getSelector(), dataOut, bs );
+        tightMarshalString2( info->getSubscriptionName(), dataOut, bs );
+        bs->readBoolean();
+        bs->readBoolean();
+        bs->readBoolean();
+        dataOut->write( info->getPriority() );
+        tightMarshalObjectArray2( wireFormat, info->getBrokerPath(), dataOut, bs );
+        tightMarshalNestedObject2( wireFormat, info->getAdditionalPredicate(), dataOut, bs );
+        bs->readBoolean();
+        bs->readBoolean();
+        bs->readBoolean();
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ConsumerInfoMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
-    ConsumerInfo* info =
-        dynamic_cast<ConsumerInfo*>( dataStructure );
-    info->setConsumerId( dynamic_cast< ConsumerId* >( 
-        looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
-    info->setBrowser( dataIn->readBoolean() );
-    info->setDestination( dynamic_cast< ActiveMQDestination* >( 
-        looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
-    info->setPrefetchSize( dataIn->readInt() );
-    info->setMaximumPendingMessageLimit( dataIn->readInt() );
-    info->setDispatchAsync( dataIn->readBoolean() );
-    info->setSelector( looseUnmarshalString( dataIn ) );
-    info->setSubscriptionName( looseUnmarshalString( dataIn ) );
-    info->setNoLocal( dataIn->readBoolean() );
-    info->setExclusive( dataIn->readBoolean() );
-    info->setRetroactive( dataIn->readBoolean() );
-    info->setPriority( dataIn->readByte() );
-
-    if( dataIn->readBoolean() ) {
-        short size = dataIn->readShort();
-        info->getBrokerPath().reserve( size );
-        for( int i = 0; i < size; i++ ) {
-            info->getBrokerPath().push_back( dynamic_cast<BrokerId* >(
-                looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+    try {
+
+        BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        ConsumerInfo* info =
+            dynamic_cast<ConsumerInfo*>( dataStructure );
+        info->setConsumerId( dynamic_cast< ConsumerId* >( 
+            looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+        info->setBrowser( dataIn->readBoolean() );
+        info->setDestination( dynamic_cast< ActiveMQDestination* >( 
+            looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+        info->setPrefetchSize( dataIn->readInt() );
+        info->setMaximumPendingMessageLimit( dataIn->readInt() );
+        info->setDispatchAsync( dataIn->readBoolean() );
+        info->setSelector( looseUnmarshalString( dataIn ) );
+        info->setSubscriptionName( looseUnmarshalString( dataIn ) );
+        info->setNoLocal( dataIn->readBoolean() );
+        info->setExclusive( dataIn->readBoolean() );
+        info->setRetroactive( dataIn->readBoolean() );
+        info->setPriority( dataIn->readByte() );
+
+        if( dataIn->readBoolean() ) {
+            short size = dataIn->readShort();
+            info->getBrokerPath().reserve( size );
+            for( int i = 0; i < size; i++ ) {
+                info->getBrokerPath().push_back( dynamic_cast<BrokerId* >(
+                    looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+            }
         }
+        else {
+            info->getBrokerPath().clear();
+        }
+        info->setAdditionalPredicate( dynamic_cast< BooleanExpression* >( 
+            looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+        info->setNetworkSubscription( dataIn->readBoolean() );
+        info->setOptimizedAcknowledge( dataIn->readBoolean() );
+        info->setNoRangeAcks( dataIn->readBoolean() );
     }
-    else {
-        info->getBrokerPath().clear();
-    }
-    info->setAdditionalPredicate( dynamic_cast< BooleanExpression* >( 
-        looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
-    info->setNetworkSubscription( dataIn->readBoolean() );
-    info->setOptimizedAcknowledge( dataIn->readBoolean() );
-    info->setNoRangeAcks( dataIn->readBoolean() );
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ConsumerInfoMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    ConsumerInfo* info =
-        dynamic_cast<ConsumerInfo*>( dataStructure );
-    BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
-
-    looseMarshalCachedObject( wireFormat, info->getConsumerId(), dataOut );
-    dataOut->writeBoolean( info->isBrowser() );
-    looseMarshalCachedObject( wireFormat, info->getDestination(), dataOut );
-    dataOut->writeInt( info->getPrefetchSize() );
-    dataOut->writeInt( info->getMaximumPendingMessageLimit() );
-    dataOut->writeBoolean( info->isDispatchAsync() );
-    looseMarshalString( info->getSelector(), dataOut );
-    looseMarshalString( info->getSubscriptionName(), dataOut );
-    dataOut->writeBoolean( info->isNoLocal() );
-    dataOut->writeBoolean( info->isExclusive() );
-    dataOut->writeBoolean( info->isRetroactive() );
-    dataOut->write( info->getPriority() );
-    looseMarshalObjectArray( wireFormat, info->getBrokerPath(), dataOut );
-    looseMarshalNestedObject( wireFormat, info->getAdditionalPredicate(), dataOut );
-    dataOut->writeBoolean( info->isNetworkSubscription() );
-    dataOut->writeBoolean( info->isOptimizedAcknowledge() );
-    dataOut->writeBoolean( info->isNoRangeAcks() );
+    try {
+
+        ConsumerInfo* info =
+            dynamic_cast<ConsumerInfo*>( dataStructure );
+         BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+        looseMarshalCachedObject( wireFormat, info->getConsumerId(), dataOut );
+        dataOut->writeBoolean( info->isBrowser() );
+        looseMarshalCachedObject( wireFormat, info->getDestination(), dataOut );
+        dataOut->writeInt( info->getPrefetchSize() );
+        dataOut->writeInt( info->getMaximumPendingMessageLimit() );
+        dataOut->writeBoolean( info->isDispatchAsync() );
+        looseMarshalString( info->getSelector(), dataOut );
+        looseMarshalString( info->getSubscriptionName(), dataOut );
+        dataOut->writeBoolean( info->isNoLocal() );
+        dataOut->writeBoolean( info->isExclusive() );
+        dataOut->writeBoolean( info->isRetroactive() );
+        dataOut->write( info->getPriority() );
+        looseMarshalObjectArray( wireFormat, info->getBrokerPath(), dataOut );
+        looseMarshalNestedObject( wireFormat, info->getAdditionalPredicate(), dataOut );
+        dataOut->writeBoolean( info->isNetworkSubscription() );
+        dataOut->writeBoolean( info->isOptimizedAcknowledge() );
+        dataOut->writeBoolean( info->isNoRangeAcks() );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ControlCommandMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ControlCommandMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ControlCommandMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/ControlCommandMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,51 +48,81 @@
 ///////////////////////////////////////////////////////////////////////////////
 void ControlCommandMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
-    ControlCommand* info =
-        dynamic_cast<ControlCommand*>( dataStructure );
-    info->setCommand( tightUnmarshalString( dataIn, bs ) );
+        BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+        ControlCommand* info =
+            dynamic_cast<ControlCommand*>( dataStructure );
+        info->setCommand( tightUnmarshalString( dataIn, bs ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int ControlCommandMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    ControlCommand* info =
-        dynamic_cast<ControlCommand*>( dataStructure );
+    try {
+
+        ControlCommand* info =
+            dynamic_cast<ControlCommand*>( dataStructure );
 
-    int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
-    rc += tightMarshalString1( info->getCommand(), bs );
+        int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+        rc += tightMarshalString1( info->getCommand(), bs );
 
-    return rc + 0;
+        return rc + 0;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ControlCommandMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+    try {
 
-    ControlCommand* info =
-        dynamic_cast<ControlCommand*>( dataStructure );
-    tightMarshalString2( info->getCommand(), dataOut, bs );
+        BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+
+        ControlCommand* info =
+            dynamic_cast<ControlCommand*>( dataStructure );
+        tightMarshalString2( info->getCommand(), dataOut, bs );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ControlCommandMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
-    ControlCommand* info =
-        dynamic_cast<ControlCommand*>( dataStructure );
-    info->setCommand( looseUnmarshalString( dataIn ) );
+    try {
+
+        BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        ControlCommand* info =
+            dynamic_cast<ControlCommand*>( dataStructure );
+        info->setCommand( looseUnmarshalString( dataIn ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void ControlCommandMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    ControlCommand* info =
-        dynamic_cast<ControlCommand*>( dataStructure );
-    BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+    try {
 
-    looseMarshalString( info->getCommand(), dataOut );
+        ControlCommand* info =
+            dynamic_cast<ControlCommand*>( dataStructure );
+         BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+        looseMarshalString( info->getCommand(), dataOut );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/DataArrayResponseMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/DataArrayResponseMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/DataArrayResponseMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/DataArrayResponseMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,73 +48,103 @@
 ///////////////////////////////////////////////////////////////////////////////
 void DataArrayResponseMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    ResponseMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
-    DataArrayResponse* info =
-        dynamic_cast<DataArrayResponse*>( dataStructure );
+        ResponseMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
 
-    if( bs->readBoolean() ) {
-        short size = dataIn->readShort();
-        info->getData().reserve( size );
-        for( int i = 0; i < size; i++ ) {
-            info->getData().push_back( dynamic_cast< DataStructure* >(
-                tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
+        DataArrayResponse* info =
+            dynamic_cast<DataArrayResponse*>( dataStructure );
+
+        if( bs->readBoolean() ) {
+            short size = dataIn->readShort();
+            info->getData().reserve( size );
+            for( int i = 0; i < size; i++ ) {
+                info->getData().push_back( dynamic_cast< DataStructure* >(
+                    tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
+            }
+        }
+        else {
+            info->getData().clear();
         }
     }
-    else {
-        info->getData().clear();
-    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int DataArrayResponseMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    DataArrayResponse* info =
-        dynamic_cast<DataArrayResponse*>( dataStructure );
+    try {
 
-    int rc = ResponseMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
-    rc += tightMarshalObjectArray1( wireFormat, info->getData(), bs );
+        DataArrayResponse* info =
+            dynamic_cast<DataArrayResponse*>( dataStructure );
 
-    return rc + 0;
+        int rc = ResponseMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+        rc += tightMarshalObjectArray1( wireFormat, info->getData(), bs );
+
+        return rc + 0;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void DataArrayResponseMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
 
-    ResponseMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+    try {
+
+        ResponseMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
 
-    DataArrayResponse* info =
-        dynamic_cast<DataArrayResponse*>( dataStructure );
-    tightMarshalObjectArray2( wireFormat, info->getData(), dataOut, bs );
+        DataArrayResponse* info =
+            dynamic_cast<DataArrayResponse*>( dataStructure );
+        tightMarshalObjectArray2( wireFormat, info->getData(), dataOut, bs );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void DataArrayResponseMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    ResponseMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
-    DataArrayResponse* info =
-        dynamic_cast<DataArrayResponse*>( dataStructure );
-
-    if( dataIn->readBoolean() ) {
-        short size = dataIn->readShort();
-        info->getData().reserve( size );
-        for( int i = 0; i < size; i++ ) {
-            info->getData().push_back( dynamic_cast<DataStructure* >(
-                looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+    try {
+
+        ResponseMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        DataArrayResponse* info =
+            dynamic_cast<DataArrayResponse*>( dataStructure );
+
+        if( dataIn->readBoolean() ) {
+            short size = dataIn->readShort();
+            info->getData().reserve( size );
+            for( int i = 0; i < size; i++ ) {
+                info->getData().push_back( dynamic_cast<DataStructure* >(
+                    looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+            }
+        }
+        else {
+            info->getData().clear();
         }
     }
-    else {
-        info->getData().clear();
-    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void DataArrayResponseMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    DataArrayResponse* info =
-        dynamic_cast<DataArrayResponse*>( dataStructure );
-    ResponseMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+    try {
+
+        DataArrayResponse* info =
+            dynamic_cast<DataArrayResponse*>( dataStructure );
+         ResponseMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
 
-    looseMarshalObjectArray( wireFormat, info->getData(), dataOut );
+        looseMarshalObjectArray( wireFormat, info->getData(), dataOut );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/DataResponseMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/DataResponseMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/DataResponseMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/DataResponseMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,53 +48,83 @@
 ///////////////////////////////////////////////////////////////////////////////
 void DataResponseMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    ResponseMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
-    DataResponse* info =
-        dynamic_cast<DataResponse*>( dataStructure );
-    info->setData( dynamic_cast< DataStructure* >(
-        tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
+        ResponseMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+        DataResponse* info =
+            dynamic_cast<DataResponse*>( dataStructure );
+        info->setData( dynamic_cast< DataStructure* >(
+            tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int DataResponseMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    DataResponse* info =
-        dynamic_cast<DataResponse*>( dataStructure );
+    try {
+
+        DataResponse* info =
+            dynamic_cast<DataResponse*>( dataStructure );
 
-    int rc = ResponseMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
-    rc += tightMarshalNestedObject1( wireFormat, info->getData(), bs );
+        int rc = ResponseMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+        rc += tightMarshalNestedObject1( wireFormat, info->getData(), bs );
 
-    return rc + 0;
+        return rc + 0;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void DataResponseMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
 
-    ResponseMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+    try {
 
-    DataResponse* info =
-        dynamic_cast<DataResponse*>( dataStructure );
-    tightMarshalNestedObject2( wireFormat, info->getData(), dataOut, bs );
+        ResponseMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+
+        DataResponse* info =
+            dynamic_cast<DataResponse*>( dataStructure );
+        tightMarshalNestedObject2( wireFormat, info->getData(), dataOut, bs );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void DataResponseMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    ResponseMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
-    DataResponse* info =
-        dynamic_cast<DataResponse*>( dataStructure );
-    info->setData( dynamic_cast< DataStructure* >( 
-        looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+    try {
+
+        ResponseMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        DataResponse* info =
+            dynamic_cast<DataResponse*>( dataStructure );
+        info->setData( dynamic_cast< DataStructure* >( 
+            looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void DataResponseMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    DataResponse* info =
-        dynamic_cast<DataResponse*>( dataStructure );
-    ResponseMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+    try {
 
-    looseMarshalNestedObject( wireFormat, info->getData(), dataOut );
+        DataResponse* info =
+            dynamic_cast<DataResponse*>( dataStructure );
+         ResponseMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+        looseMarshalNestedObject( wireFormat, info->getData(), dataOut );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/DestinationInfoMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/DestinationInfoMarshaller.cpp?view=diff&rev=510313&r1=510312&r2=510313
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/DestinationInfoMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/DestinationInfoMarshaller.cpp Wed Feb 21 15:41:51 2007
@@ -48,96 +48,126 @@
 ///////////////////////////////////////////////////////////////////////////////
 void DestinationInfoMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+    try {
 
-    DestinationInfo* info =
-        dynamic_cast<DestinationInfo*>( dataStructure );
-    info->setConnectionId( dynamic_cast< ConnectionId* >(
-        tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
-    info->setDestination( dynamic_cast< ActiveMQDestination* >(
-        tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
-    info->setOperationType( dataIn->readByte() );
-    info->setTimeout( tightUnmarshalLong( wireFormat, dataIn, bs ) );
-
-    if( bs->readBoolean() ) {
-        short size = dataIn->readShort();
-        info->getBrokerPath().reserve( size );
-        for( int i = 0; i < size; i++ ) {
-            info->getBrokerPath().push_back( dynamic_cast< BrokerId* >(
-                tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
+        BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+        DestinationInfo* info =
+            dynamic_cast<DestinationInfo*>( dataStructure );
+        info->setConnectionId( dynamic_cast< ConnectionId* >(
+            tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
+        info->setDestination( dynamic_cast< ActiveMQDestination* >(
+            tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) );
+        info->setOperationType( dataIn->readByte() );
+        info->setTimeout( tightUnmarshalLong( wireFormat, dataIn, bs ) );
+
+        if( bs->readBoolean() ) {
+            short size = dataIn->readShort();
+            info->getBrokerPath().reserve( size );
+            for( int i = 0; i < size; i++ ) {
+                info->getBrokerPath().push_back( dynamic_cast< BrokerId* >(
+                    tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) );
+            }
+        }
+        else {
+            info->getBrokerPath().clear();
         }
     }
-    else {
-        info->getBrokerPath().clear();
-    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 int DestinationInfoMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( io::IOException ) {
 
-    DestinationInfo* info =
-        dynamic_cast<DestinationInfo*>( dataStructure );
+    try {
 
-    int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
-    rc += tightMarshalCachedObject1( wireFormat, info->getConnectionId(), bs );
-    rc += tightMarshalCachedObject1( wireFormat, info->getDestination(), bs );
-    rc += tightMarshalLong1( wireFormat, info->getTimeout(), bs );
-    rc += tightMarshalObjectArray1( wireFormat, info->getBrokerPath(), bs );
+        DestinationInfo* info =
+            dynamic_cast<DestinationInfo*>( dataStructure );
 
-    return rc + 1;
+        int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+        rc += tightMarshalCachedObject1( wireFormat, info->getConnectionId(), bs );
+        rc += tightMarshalCachedObject1( wireFormat, info->getDestination(), bs );
+        rc += tightMarshalLong1( wireFormat, info->getTimeout(), bs );
+        rc += tightMarshalObjectArray1( wireFormat, info->getBrokerPath(), bs );
+
+        return rc + 1;
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void DestinationInfoMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+    try {
+
+        BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
 
-    DestinationInfo* info =
-        dynamic_cast<DestinationInfo*>( dataStructure );
-    tightMarshalCachedObject2( wireFormat, info->getConnectionId(), dataOut, bs );
-    tightMarshalCachedObject2( wireFormat, info->getDestination(), dataOut, bs );
-    dataOut->write( info->getOperationType() );
-    tightMarshalLong2( wireFormat, info->getTimeout(), dataOut, bs );
-    tightMarshalObjectArray2( wireFormat, info->getBrokerPath(), dataOut, bs );
+        DestinationInfo* info =
+            dynamic_cast<DestinationInfo*>( dataStructure );
+        tightMarshalCachedObject2( wireFormat, info->getConnectionId(), dataOut, bs );
+        tightMarshalCachedObject2( wireFormat, info->getDestination(), dataOut, bs );
+        dataOut->write( info->getOperationType() );
+        tightMarshalLong2( wireFormat, info->getTimeout(), dataOut, bs );
+        tightMarshalObjectArray2( wireFormat, info->getBrokerPath(), dataOut, bs );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void DestinationInfoMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( io::IOException ) {
 
-    BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
-    DestinationInfo* info =
-        dynamic_cast<DestinationInfo*>( dataStructure );
-    info->setConnectionId( dynamic_cast< ConnectionId* >( 
-        looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
-    info->setDestination( dynamic_cast< ActiveMQDestination* >( 
-        looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
-    info->setOperationType( dataIn->readByte() );
-    info->setTimeout( looseUnmarshalLong( wireFormat, dataIn ) );
-
-    if( dataIn->readBoolean() ) {
-        short size = dataIn->readShort();
-        info->getBrokerPath().reserve( size );
-        for( int i = 0; i < size; i++ ) {
-            info->getBrokerPath().push_back( dynamic_cast<BrokerId* >(
-                looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+    try {
+
+        BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+        DestinationInfo* info =
+            dynamic_cast<DestinationInfo*>( dataStructure );
+        info->setConnectionId( dynamic_cast< ConnectionId* >( 
+            looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+        info->setDestination( dynamic_cast< ActiveMQDestination* >( 
+            looseUnmarshalCachedObject( wireFormat, dataIn ) ) );
+        info->setOperationType( dataIn->readByte() );
+        info->setTimeout( looseUnmarshalLong( wireFormat, dataIn ) );
+
+        if( dataIn->readBoolean() ) {
+            short size = dataIn->readShort();
+            info->getBrokerPath().reserve( size );
+            for( int i = 0; i < size; i++ ) {
+                info->getBrokerPath().push_back( dynamic_cast<BrokerId* >(
+                    looseUnmarshalNestedObject( wireFormat, dataIn ) ) );
+            }
+        }
+        else {
+            info->getBrokerPath().clear();
         }
     }
-    else {
-        info->getBrokerPath().clear();
-    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 void DestinationInfoMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( io::IOException ) {
 
-    DestinationInfo* info =
-        dynamic_cast<DestinationInfo*>( dataStructure );
-    BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
-
-    looseMarshalCachedObject( wireFormat, info->getConnectionId(), dataOut );
-    looseMarshalCachedObject( wireFormat, info->getDestination(), dataOut );
-    dataOut->write( info->getOperationType() );
-    looseMarshalLong( wireFormat, info->getTimeout(), dataOut );
-    looseMarshalObjectArray( wireFormat, info->getBrokerPath(), dataOut );
+    try {
+
+        DestinationInfo* info =
+            dynamic_cast<DestinationInfo*>( dataStructure );
+         BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+
+        looseMarshalCachedObject( wireFormat, info->getConnectionId(), dataOut );
+        looseMarshalCachedObject( wireFormat, info->getDestination(), dataOut );
+        dataOut->write( info->getOperationType() );
+        looseMarshalLong( wireFormat, info->getTimeout(), dataOut );
+        looseMarshalObjectArray( wireFormat, info->getBrokerPath(), dataOut );
+    }
+    AMQ_CATCH_RETHROW( io::IOException )
+    AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, io::IOException )
+    AMQ_CATCHALL_THROW( io::IOException )
 }
 



Mime
View raw message