Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/tests/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp
diff options
context:
space:
mode:
authorMartin Hořeňovský2022-04-16 14:12:56 +0200
committerMartin Hořeňovský2022-04-16 16:33:50 +0200
commit05e85c5652480b584287f406b2170f61b02d560c (patch)
tree9ffc1e68450480f16dfc67e1a88a5890d7b56c9d /tests/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp
parentb5202576766c63a29275a8386a8e3c0439089382 (diff)
downloadcatch3-05e85c5652480b584287f406b2170f61b02d560c.tar.gz
Split out Catch::cout/cerr/clog into their own file
Diffstat (limited to 'tests/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp')
-rw-r--r--tests/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp b/tests/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp
index b506d8b8..725440ec 100644
--- a/tests/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp
+++ b/tests/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp
@@ -8,11 +8,13 @@
#include <catch2/catch_test_macros.hpp>
+#include <iostream>
+
namespace Catch {
[[noreturn]]
void throw_exception(std::exception const& e) {
- Catch::cerr() << "====== CUSTOM HANDLER ====== run terminates because an exception was thrown.\n"
- << "The message was: " << e.what() << '\n';
+ std::cerr << "====== CUSTOM HANDLER ====== run terminates because an exception was thrown.\n"
+ << "The message was: " << e.what() << '\n';
// Avoid abort and other exceptional exits -- there is no way
// to tell CMake that abort is the desired outcome of a test.
exit(1);