[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 96410b7 2/4: Use std::uncaught_exceptions() i
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 96410b7 2/4: Use std::uncaught_exceptions() instead of uncaught_exception() |
Date: |
Sat, 24 Mar 2018 08:21:47 -0400 (EDT) |
branch: master
commit 96410b7a8108d12e6ca77700a102b7652e6232c9
Author: Vadim Zeitlin <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Use std::uncaught_exceptions() instead of uncaught_exception()
In C++17, uncaught_exception(), returning bool, is deprecated and a new
uncaught_exceptions(), returning int, should be used instead.
This notably avoids deprecation warnings from MSVS 2017.
---
main_wx_test.cpp | 2 +-
wx_test_document.hpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/main_wx_test.cpp b/main_wx_test.cpp
index 69b1f2f..09b96d6 100644
--- a/main_wx_test.cpp
+++ b/main_wx_test.cpp
@@ -760,7 +760,7 @@ void SkeletonTest::OnAssertFailure
// another exception is already in flight as this would just result in the
// program termination without any useful information about the reason of
// the failure whatsoever.
- if(is_running_tests_ && !std::uncaught_exception())
+ if(is_running_tests_ && !std::uncaught_exceptions())
{
throw test_assertion_failure_exception(msg ? msg : cond, file, line,
func);
}
diff --git a/wx_test_document.hpp b/wx_test_document.hpp
index fd51978..99c01a6 100644
--- a/wx_test_document.hpp
+++ b/wx_test_document.hpp
@@ -68,7 +68,7 @@ class wx_test_document_base
// test failure, as this is not a bug in the test code then.
if(opened_)
{
- if(std::uncaught_exception())
+ if(std::uncaught_exceptions())
{
// Moreover, in case of exception, try to close the window to
// avoid showing message boxes asking the user if it should be