check_exception(const std::string &type, const std::string &name)
{
# ifdef DEAL_II_WITH_MPI
-# if __cpp_lib_uncaught_exceptions >= 201411
- // std::uncaught_exception() is deprecated in c++17
if (std::uncaught_exceptions() != 0)
-# else
- if (std::uncaught_exception() == true)
-# endif
{
std::cerr
<< "---------------------------------------------------------\n"
if (static_cast<bool>(libraries & InitializeLibrary::MPI) &&
(MPI_has_been_started))
{
-# if __cpp_lib_uncaught_exceptions >= 201411
- // std::uncaught_exception() is deprecated in c++17
if (std::uncaught_exceptions() > 0)
-# else
- if (std::uncaught_exception() == true)
-# endif
{
// do not try to call MPI_Finalize to avoid a deadlock.
}
check_exception()
{
#ifdef DEAL_II_WITH_MPI
-# if __cpp_lib_uncaught_exceptions >= 201411
- // std::uncaught_exception() is deprecated in c++17
if (std::uncaught_exceptions() != 0)
-# else
- if (std::uncaught_exception() == true)
-# endif
{
std::cerr
<< "---------------------------------------------------------\n"
// just display a message and continue the program.
if (counter != 0)
{
-# if __cpp_lib_uncaught_exceptions >= 201411
- // std::uncaught_exception() is deprecated in c++17
if (std::uncaught_exceptions() == 0)
-# else
- if (std::uncaught_exception() == false)
-# endif
{
std::string infostring;
for (const auto &map_entry : counter_map)
// avoid communicating with other processes if there is an uncaught
// exception
#ifdef DEAL_II_WITH_MPI
-# if __cpp_lib_uncaught_exceptions >= 201411
- // std::uncaught_exception() is deprecated in c++17
if (std::uncaught_exceptions() > 0 && mpi_communicator != MPI_COMM_SELF)
-# else
- if (std::uncaught_exception() == true && mpi_communicator != MPI_COMM_SELF)
-# endif
{
const unsigned int myid =
Utilities::MPI::this_mpi_process(mpi_communicator);