Commit 4c62625f authored by Dominik Charousset's avatar Dominik Charousset

Catch exceptions in unit test default main

parent c361c9af
...@@ -219,7 +219,10 @@ logger::stream logger::massive() { ...@@ -219,7 +219,10 @@ logger::stream logger::massive() {
return stream{*this, level::massive}; return stream{*this, level::massive};
} }
logger::logger() : console_(std::cerr) { logger::logger()
: level_console_(level::error),
level_file_(level::error),
console_(std::cerr) {
// nop // nop
} }
...@@ -567,7 +570,12 @@ expr::expr(test* parent, const char* filename, size_t lineno, ...@@ -567,7 +570,12 @@ expr::expr(test* parent, const char* filename, size_t lineno,
#ifndef CAF_TEST_NO_MAIN #ifndef CAF_TEST_NO_MAIN
int main(int argc, char** argv) { int main(int argc, char** argv) {
try {
return caf::test::main(argc, argv); return caf::test::main(argc, argv);
} catch (std::exception& e) {
std::cerr << "exception: " << e.what() << std::endl;
}
return 1;
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment