diff options
author | Alan Conway <aconway@apache.org> | 2007-12-10 21:03:07 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2007-12-10 21:03:07 +0000 |
commit | a3e626da0b9c82bd421a498fb7e13de3a76220d0 (patch) | |
tree | 9026cffe7d372c0faa845e451ac12d4572203db1 /cpp/src | |
parent | a9834abea8c4bf0f3c8e6510bdadfdc0d766bd5f (diff) | |
download | qpid-python-a3e626da0b9c82bd421a498fb7e13de3a76220d0.tar.gz |
Improved exception message for messages out-of-order.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@603047 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/tests/perftest.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/cpp/src/tests/perftest.cpp b/cpp/src/tests/perftest.cpp index d6185a0100..bf6b0fe4d5 100644 --- a/cpp/src/tests/perftest.cpp +++ b/cpp/src/tests/perftest.cpp @@ -231,9 +231,13 @@ class Stats { // 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 (const std::exception&) { + throw Exception("Bad report: "+data); + } } double mean() const { @@ -423,7 +427,7 @@ struct SubscribeThread : public Client { size_t lastMsg=0; for (size_t i = 0; i < opts.subQuota; ++i) { msg=lq.pop(); - // TODO aconway 2007-11-23: check message sequence for + // TODO aconway 2007-11-23: check message order for. // multiple publishers. Need an array of counters, // one per publisher and a publisher ID in the // message. Careful not to introduce a lot of overhead @@ -435,7 +439,10 @@ struct SubscribeThread : public Client { size_t n = *reinterpret_cast<uint32_t*>(data); if (n < lastMsg) { // Report to control. - Message error("Out-of-sequence messages", "sub_done"); + Message error( + QPID_MSG("Out-of-sequence messages, expected n>=" + << lastMsg << " got " << n), + "sub_done"); session.messageTransfer(arg::content=error); return; } |