You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gs...@apache.org on 2008/06/03 14:39:14 UTC

svn commit: r662774 - in /incubator/qpid/trunk/qpid/cpp/src/qpid/broker: SemanticState.cpp TxPublish.cpp

Author: gsim
Date: Tue Jun  3 05:39:14 2008
New Revision: 662774

URL: http://svn.apache.org/viewvc?rev=662774&view=rev
Log:
Better exception handling for commit.


Modified:
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/TxPublish.cpp

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp?rev=662774&r1=662773&r2=662774&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp Tue Jun  3 05:39:14 2008
@@ -127,6 +127,8 @@
     txBuffer->enlist(txAck);
     if (txBuffer->commitLocal(store)) {
         accumulatedAck.clear();
+    } else {
+        throw InternalErrorException(QPID_MSG("Commit failed"));
     }
 }
 

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/TxPublish.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/TxPublish.cpp?rev=662774&r1=662773&r2=662774&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/TxPublish.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/TxPublish.cpp Tue Jun  3 05:39:14 2008
@@ -30,10 +30,12 @@
     try{
         for_each(queues.begin(), queues.end(), Prepare(ctxt, msg));
         return true;
+    }catch(const std::exception& e){
+        QPID_LOG(error, "Failed to prepare: " << e.what());
     }catch(...){
-        QPID_LOG(error, "Failed to prepare");
-        return false;
+        QPID_LOG(error, "Failed to prepare (unknown error)");
     }
+    return false;
 }
 
 void TxPublish::commit() throw(){