You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Catch2 does not report the text of unexpected exceptions (ex.what()) on the console.
Expected behavior
If exceptions are enabled, and code in a TEST_CASE throws an exception derived from std::exception, the exception.what() text should be displayed to the user.
Actual behavior
The following is displayed:
Failure:
unexpected exception
Process finished with exit code 1
This has been seen by multiple users of ApprovalTests.cpp, on multiple different machines
It's reproducible with the Xcode C++ compiler, g++9, clang-9
I'm building in CLion, but I don't see why that would matter
I cannot seen anywhere in the Catch2 source code that prints out just unexpected exception - so I am stumped as to where this comes from
I've gone back through multiple old catch releases, back to v2.0.1 - and have not been able to get the exception text to print
But I swear that I previously was able to get exception text displayed
I paired with someone else who saw this on their Mac, with a similarly minimal example - and they switched to Windows and the same code did display the exception text
So I suspect it may be a Mac-specific issue (but compiler-independent - I've been working on Mac for less than a year)
The text was updated successfully, but these errors were encountered:
Describe the bug
Catch2 does not report the text of unexpected exceptions (
ex.what()
) on the console.Expected behavior
If exceptions are enabled, and code in a
TEST_CASE
throws an exception derived fromstd::exception
, the exception.what() text should be displayed to the user.Actual behavior
The following is displayed:
Reproduction steps
main.cpp
Catch2Tests.cpp
CMakeLists.txt
Platform information:
Additional context
The text was updated successfully, but these errors were encountered: