]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Try catching correct excpetion type 15349/head
authorDaniel Arndt <arndtd@ornl.gov>
Thu, 15 Jun 2023 16:30:28 +0000 (12:30 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Thu, 15 Jun 2023 16:30:28 +0000 (12:30 -0400)
tests/petsc/petsc_snes_02.cc
tests/petsc/petsc_snes_02.output
tests/petsc/petsc_snes_02.output.clang-16 [deleted file]
tests/petsc/petsc_ts_01.cc
tests/petsc/petsc_ts_01.output
tests/petsc/petsc_ts_01.output.clang-16 [deleted file]

index 7975927d9e87003f5f033f42125a13fdc136a6e7..d2edd32ac139e6d23ee915709a54343d14bac27d 100644 (file)
@@ -77,6 +77,10 @@ main(int argc, char **argv)
       AssertThrow(snes == static_cast<SNES>(mysolver), ExcInternalError());
       mysolver.solve(v, A);
     }
+  catch (StandardExceptions::ExcFunctionNotProvided)
+    {
+      deallog << "catching expected exception" << std::endl;
+    }
   catch (std::exception &exc)
     {
       deallog << exc.what() << std::endl;
index 7d1d25f3b3baa5bcabc04b2e491b00e7d7de1131..049eb1d7edbf9f3ef15744f280f4f765449c5945 100644 (file)
@@ -1,11 +1,2 @@
 
-DEAL::
---------------------------------------------------------
-An error occurred in file <petsc_snes.templates.h> in function
-    unsigned int dealii::PETScWrappers::NonlinearSolver<VectorType, PMatrixType, AMatrixType>::solve(VectorType&) [with VectorType = VectorType; PMatrixType = MatrixType; AMatrixType = MatrixType]
-The violated condition was: 
-    residual
-Additional information: 
-    Please provide an implementation for the function "residual"
---------------------------------------------------------
-
+DEAL::catching expected exception
diff --git a/tests/petsc/petsc_snes_02.output.clang-16 b/tests/petsc/petsc_snes_02.output.clang-16
deleted file mode 100644 (file)
index 24f2ed3..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-
-DEAL::
---------------------------------------------------------
-An error occurred in file <petsc_snes.templates.h> in function
-    unsigned int dealii::PETScWrappers::NonlinearSolver<VectorType, MatrixType>::solve(VectorType &) [VectorType = VectorType, PMatrixType = MatrixType, AMatrixType = MatrixType]
-The violated condition was: 
-    residual
-Additional information: 
-    Please provide an implementation for the function "residual"
---------------------------------------------------------
-
index b106465bde9d1b73772393631bd65c6a448a4f58..92f7690b2b8e013353869c90127c39f7595b311e 100644 (file)
@@ -79,6 +79,10 @@ main(int argc, char **argv)
       AssertThrow(ts == static_cast<TS>(myode), ExcInternalError());
       myode.solve(v, A);
     }
+  catch (StandardExceptions::ExcFunctionNotProvided)
+    {
+      deallog << "catching expected exception" << std::endl;
+    }
   catch (std::exception &exc)
     {
       deallog << exc.what() << std::endl;
index 761c7667f51f51aaa1d5ad10b34464e05154fbf0..049eb1d7edbf9f3ef15744f280f4f765449c5945 100644 (file)
@@ -1,12 +1,2 @@
 
-DEAL::
---------------------------------------------------------
-An error occurred in file <petsc_ts.templates.h> in function
-    unsigned int dealii::PETScWrappers::TimeStepper<VectorType, PMatrixType, AMatrixType>::solve(VectorType&) [with VectorType = VectorType; PMatrixType = MatrixType; AMatrixType = MatrixType]
-The violated condition was: 
-    explicit_function || implicit_function
-Additional information: 
-    Please provide an implementation for the function "explicit_function
-    || implicit_function"
---------------------------------------------------------
-
+DEAL::catching expected exception
diff --git a/tests/petsc/petsc_ts_01.output.clang-16 b/tests/petsc/petsc_ts_01.output.clang-16
deleted file mode 100644 (file)
index 745a0ab..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-
-DEAL::
---------------------------------------------------------
-An error occurred in file <petsc_ts.templates.h> in function
-    unsigned int dealii::PETScWrappers::TimeStepper<VectorType, MatrixType>::solve(VectorType &) [VectorType = VectorType, PMatrixType = MatrixType, AMatrixType = MatrixType]
-The violated condition was: 
-    explicit_function || implicit_function
-Additional information: 
-    Please provide an implementation for the function "explicit_function
-    || implicit_function"
---------------------------------------------------------
-

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.