[asterisk-scf-commits] asterisk-scf/integration/ice-util-cpp.git branch "retry_deux" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Fri Mar 30 17:08:43 CDT 2012


branch "retry_deux" has been updated
       via  1f24ad55be187f5cc529703f0583521857a8a573 (commit)
      from  1c2633ef7cfdb6fc38e987ca6672615f1a88cb58 (commit)

Summary of changes:
 include/AsteriskSCF/Operations/OperationMonitor.h |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit 1f24ad55be187f5cc529703f0583521857a8a573
Author: David M. Lee <dlee at digium.com>
Date:   Fri Mar 30 17:06:41 2012 -0500

    Fixed OperationMonitor for libstdc++
    
    The string ctor for std::exception is non-standard. Replaced with a user
    defined exception.

diff --git a/include/AsteriskSCF/Operations/OperationMonitor.h b/include/AsteriskSCF/Operations/OperationMonitor.h
index c9f734d..dad6a6d 100755
--- a/include/AsteriskSCF/Operations/OperationMonitor.h
+++ b/include/AsteriskSCF/Operations/OperationMonitor.h
@@ -147,6 +147,11 @@ protected:
 };
 typedef boost::shared_ptr<ContextData> ContextDataPtr;
 
+class CancelledOperationException : public std::exception {
+public:
+    const char* what() throw() { return "Cancelled operation"; }
+};
+
 /**
  * Template derived class of ContextData.  
  * TODO: comment on rationale. The general idea is that the casting
@@ -177,7 +182,7 @@ public:
             // implies that the operation was cancelled and results should
             // not be expected.
             //
-            throw std::exception("Cancelled operation");
+            throw CancelledOperationException();
         }
         
         if (mExceptionResult)
@@ -495,7 +500,7 @@ DT getContext(const AsteriskSCF::Operations::OperationContextCachePtr& cache,
 {
     DT c(new typename DT::element_type);
     AsteriskSCF::Operations::OperationContextCookiePtr o;
-     
+
     if (!cache->addOperationContext(context, c, o))
     {
         c = boost::dynamic_pointer_cast<typename DT::element_type>(o);

-----------------------------------------------------------------------


-- 
asterisk-scf/integration/ice-util-cpp.git



More information about the asterisk-scf-commits mailing list