boostorg / boostorg/test

Provide an option to disable exception catching

Open
#317 7 comments 0 reactions 0 assignees View on GitHub
discussion doc maybe-fixed
Dominant language
C++
Stars
213
Forks
149
Avg merge
18h 17m
Merged PRs (30d)
2

Description

Some times it's useful to just let unexpected exceptions do their work in tests. Especially when debugging. For example, gtest [provides the option `--gtest_catch_exceptions=0` or the environment variable `GTEST_CATCH_EXCEPTIONS`](https://github.com/google/googletest/blob/master/docs/advanced.md), where the test framework doesn't catch any exceptions if any of these options is set to 0.

Granted, catching unexpected exceptions by default is helpful because otherwise the tests will abort. But then during debugging (at the dev's will, for example, using a command line argument like the one above), it's much easier to catch unintended bug by just letting the tests/program fire and abort the program. A debugger will immediately show the correct stack trace and the source of the problem.

I think adding such a command line argument (and maybe also environment variable) is very useful and saves lots of time when debugging.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.