qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r601457 - /incubator/qpid/trunk/qpid/cpp/src/tests/perftest.cpp
Date Wed, 05 Dec 2007 18:24:38 GMT
Author: aconway
Date: Wed Dec  5 10:24:37 2007
New Revision: 601457

URL: http://svn.apache.org/viewvc?rev=601457&view=rev
Log:
Extra exception info.

Modified:
    incubator/qpid/trunk/qpid/cpp/src/tests/perftest.cpp

Modified: incubator/qpid/trunk/qpid/cpp/src/tests/perftest.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/perftest.cpp?rev=601457&r1=601456&r2=601457&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/perftest.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/perftest.cpp Wed Dec  5 10:24:37 2007
@@ -231,9 +231,13 @@
     
     // Functor to collect rates.
     void operator()(const string& data) {
-        double d=lexical_cast<double>(data);
-        values.push_back(d);
-        sum += d;
+        try {
+            double d=lexical_cast<double>(data);
+            values.push_back(d);
+            sum += d;
+        } catch (...) {
+            throw Exception(QPID_MSG("Bad data, expecting double: " << data));
+        }
     }
     
     double mean() const {



Mime
View raw message