From 40a6af5e6a2f8da9a2ba2a90702e55ce9dddb2fb Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 7 May 2025 14:04:14 -0600 Subject: [PATCH] Avoid displaying exception messages with their headers. --- tests/sundials/kinsol_06_v2.cc | 6 +++--- tests/sundials/kinsol_06_v2.output | 16 ++-------------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/tests/sundials/kinsol_06_v2.cc b/tests/sundials/kinsol_06_v2.cc index a384d44caa..9ca2105547 100644 --- a/tests/sundials/kinsol_06_v2.cc +++ b/tests/sundials/kinsol_06_v2.cc @@ -92,10 +92,10 @@ main() { auto niter = kinsol.solve(v); } - catch (const std::exception &e) + catch (const ExceptionBase &e) { deallog << "KINSOL threw an exception with the following message:" - << std::endl - << e.what() << std::endl; + << std::endl; + e.print_info(deallog.get_file_stream()); } } diff --git a/tests/sundials/kinsol_06_v2.output b/tests/sundials/kinsol_06_v2.output index 4553ed2b0c..0d8ed2e7bb 100644 --- a/tests/sundials/kinsol_06_v2.output +++ b/tests/sundials/kinsol_06_v2.output @@ -4,18 +4,6 @@ DEAL::Setting up Jacobian system at u=10.0000 DEAL::Computing residual for the 2th time, at u=10.0000 DEAL::Reporting recoverable failure. DEAL::KINSOL threw an exception with the following message: -DEAL:: --------------------------------------------------------- -An error occurred in line <0> of file <> in function - -The violated condition was: - -Additional information: - A user call-back function encountered a recoverable error, but the - underlying library that called the call-back did not manage to recover - from the error and aborted its operation. - - See the glossary entry on user call-back functions for more - information. --------------------------------------------------------- + A user call-back function encountered a recoverable error, but the underlying library that called the call-back did not manage to recover from the error and aborted its operation. +See the glossary entry on user call-back functions for more information. -- 2.39.5