]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
bench_log.cc: catch ceph::FailedAssertion exception
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 28 Oct 2014 19:06:25 +0000 (20:06 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 11 Nov 2014 12:26:37 +0000 (13:26 +0100)
Fix for:

CID 717177 (#2-1 of 3): Uncaught exception (UNCAUGHT_EXCEPT)
 root_function: In function main(int, char const **) an exception of
 type ceph::FailedAssertion is thrown and never caught.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/test/bench_log.cc

index 425f3986ce6a8a226ad285f8111c024beca961bb..774cf553d04d2afc398f668259cb00184d6b28f5 100644 (file)
@@ -53,7 +53,14 @@ int main(int argc, const char **argv)
   for (int i=0; i<threads; i++) {
     T *t = ls.front();
     ls.pop_front();
-    t->join();
+    try {
+      t->join();
+    }
+    catch (ceph::FailedAssertion &a) {
+      cout << "Failed assert in join(), exit." << std::endl;
+      delete t;
+      return -1;
+    }
     delete t;    
   }