From: Zdenek Kabelac Date: Wed, 11 Mar 2015 14:42:20 +0000 (+0100) Subject: tests: capture and print thrown errors X-Git-Tag: v2_02_118~30 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=243a135fe9091a3d306ee09b397779e503bb6adf;p=lvm2.git tests: capture and print thrown errors --- diff --git a/test/lib/runner.cpp b/test/lib/runner.cpp index a5e461525..d00aa457c 100644 --- a/test/lib/runner.cpp +++ b/test/lib/runner.cpp @@ -29,6 +29,12 @@ int main(int argc, const char **argv) { - return brick::shelltest::run( argc, argv, "LVM_TEST_FLAVOUR" ); + try { + return brick::shelltest::run( argc, argv, "LVM_TEST_FLAVOUR" ); + } catch (std::exception const& e) { + std::cout << "Exception: " << e.what() << "\n"; + } + + return 1; }