diff options
Diffstat (limited to 'unit_tests/src/test_main.cc')
-rw-r--r-- | unit_tests/src/test_main.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/unit_tests/src/test_main.cc b/unit_tests/src/test_main.cc index df16333..22cae75 100644 --- a/unit_tests/src/test_main.cc +++ b/unit_tests/src/test_main.cc @@ -17,7 +17,14 @@ #include <gtest/gtest.h> #include <gmock/gmock.h> +#include <exception> + int main(int argc, char** argv) { - testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); + try { + testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); + } catch (std::exception const &e) { + std::cout << "test_main caught exception: " << e.what() << std::endl; + return -1; + } } |