Commit Graph

3 Commits

Author SHA1 Message Date
Matthias Blankertz 0614a4acb3 Hide std::exception_ptr and friends if exceptions disabled
Some compilers, e.g. the Green Hills C++ compiler, react badly to the
appearance of std::exception_ptr, std::current_exception,
std::rethrow_exception and std::uncaught_exception(s). To allow usage of
Catch2 with these compilers when exceptions are disabled, hide the usage
of std::exception_ptr etc. when compiling with
CATCH_CONFIG_DISABLE_EXCEPTIONS.
2020-06-12 23:23:55 +02:00
Phil Nash e01ed48a70 Made everything used in test case registration noexcept
- this prevents warnings about startup-time exceptions
2017-07-13 08:25:47 +01:00
Martin Hořeňovský da0edcbe25 Collect startup exceptions instead of throwing them
Previously, some errors in Catch configuration would cause exceptions to
be thrown before main was even entered. This leads to call to
`std::terminate`, which is not a particularly nice way of ending the
binary.

Now these exceptions are registered with a global collector and used
once Catch enters main. They can also be optionally ignored, if user
supplies his own main and opts not to check them (or ignored them
intentionally).

Closes #921
2017-06-04 21:39:27 +02:00