Github user hcorg commented on a diff in the pull request:
https://github.com/apache/thrift/pull/620#discussion_r40177295
--- Diff: lib/cpp/test/SecurityTest.cpp ---
@@ -75,13 +75,17 @@ struct GlobalFixture
if (!boost::filesystem::exists(certFile("server.crt")))
{
keyDir =
boost::filesystem::path(master_test_suite().argv[master_test_suite().argc - 1]);
-
BOOST_REQUIRE_MESSAGE(boost::filesystem::exists(certFile("server.crt")),
- "The last argument to this test must
be the directory containing the test certificate(s).");
+ if (!boost::filesystem::exists(certFile("server.crt")))
+ {
+ std::cerr << "The last argument to this test must be
the directory containing the test certificate(s)." << std::endl;
--- End diff --
damn, I was using "let's do some checks in fixture constructor" method
quite offten... ok, another idea (cleaner than exit(1)) - just throw
std::runtime_error with message. Boost has to deal with exceptions, this could
make better error info etc.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---