]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid displaying exception messages with their headers. 18404/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 7 May 2025 20:04:14 +0000 (14:04 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 7 May 2025 20:04:14 +0000 (14:04 -0600)
tests/sundials/kinsol_06_v2.cc
tests/sundials/kinsol_06_v2.output

index a384d44caab4b46c554c05c2c3859efb1a04a997..9ca2105547cb4d8067b5bc2586b255b6bbbab35d 100644 (file)
@@ -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());
     }
 }
index 4553ed2b0c52d66faa6c3397860f6fcf0969a419..0d8ed2e7bb51bdac25ed3f14ebc4e8f5f8365e4f 100644 (file)
@@ -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.

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.