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

summaryrefslogtreecommitdiffhomepage
path: root/include/internal
diff options
context:
space:
mode:
authordvirtz2017-03-31 01:06:35 +0300
committerMartin Hořeňovský2017-04-04 11:27:19 +0200
commit9a07dde16dc8fab02edfac3984fb204dc61b2ba4 (patch)
treecc099583426d6f6d33c394889692d2ca26379556 /include/internal
parent6e091d399128a55887fb33f57e35bd6cbb32a162 (diff)
downloadcatch3-9a07dde16dc8fab02edfac3984fb204dc61b2ba4.tar.gz
print messages when unexpected exceptions are thrown
Diffstat (limited to 'include/internal')
-rw-r--r--include/internal/catch_message.hpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/internal/catch_message.hpp b/include/internal/catch_message.hpp
index 42866be8..1b72afec 100644
--- a/include/internal/catch_message.hpp
+++ b/include/internal/catch_message.hpp
@@ -38,7 +38,10 @@ namespace Catch {
{}
ScopedMessage::~ScopedMessage() {
- getResultCapture().popScopedMessage( m_info );
+ if (!std::uncaught_exception())
+ {
+ getResultCapture().popScopedMessage(m_info);
+ }
}