Add runtime option to disable catch2 exception handler
- Dominant language
- C++
- Stars
- 21.5k
- Forks
- 3.5k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 2
Description
If an unexpected exception is thrown from a catch2 test case, catch2 will catch exception and print out the contents of `what()` for the failing test case.
This is often fairly useless (for me at least) since it's hard to debug without any information on where the exception was actually thrown (ie. a call stack).
By default (at least on Linux) if exceptions are not caught, `abort()` will be called providing a useful coredump as well as breaking the program at the point the exception was thrown if running in a debugger.
I'm not very experienced with Windows development, but as far as I remember, Windows can do something similar giving the developer an option to debug the program if an exception is not caught if Visual Studio is installed.
There seems to be some options to disable exception handling at compile time, but it would be very useful to have a command line option to disable the catch exception handler at runtime. This could be used for instance, to allow exceptions to be caught without much information when running in a CI environment, while giving the developer an easy option to look into the details when reproducing the issue.
I will be happy to help implement this if it makes any sense.
Thanks a lot.
Contributor guide
Assessment
This issue has not been assessed yet.