master - tests: capture and print thrown errors
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=243a135fe9091a3d306ee09b397779e503bb6adf Commit: 243a135fe9091a3d306ee09b397779e503bb6adf Parent: bdf4e3e2f20dd186f3640e808930c152fc8d77e9 Author: Zdenek Kabelac <[email protected]> AuthorDate: Wed Mar 11 15:42:20 2015 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Wed Mar 11 21:17:23 2015 +0100
tests: capture and print thrown errors
--- test/lib/runner.cpp | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-)
test/lib/runner.cpp +7 -1
@@ -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; }