Skip to content

Commit

Permalink
Improved error messages for uncaught std::exception
Browse files Browse the repository at this point in the history
  • Loading branch information
craflin authored and ColinGrafAirbus committed Oct 18, 2019
1 parent 7c574ca commit fb578d5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/gtest/gtest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,11 @@ int run(const char* filter, const char* outputFile_)
;
}
}
catch (const std::exception& e)
{
std::string message = std::string("uncaught std::exception: ") + e.what();
fail(testData.test->file, testData.test->line, message.c_str());
}
catch (...)
{
fail(testData.test->file, testData.test->line, "uncaught exception");
Expand Down

0 comments on commit fb578d5

Please sign in to comment.