]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add error checking to set_option_value.
authorDavid Wells <wellsd2@rpi.edu>
Tue, 12 Jul 2016 01:13:55 +0000 (21:13 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Tue, 12 Jul 2016 01:37:40 +0000 (21:37 -0400)
include/deal.II/lac/petsc_compatibility.h

index 3968c2ae98d04fe9ed87930f4993d2be04b3a4bf..c41df420a42e1b618140dd190d8b0579933e68e0 100644 (file)
@@ -51,10 +51,12 @@ namespace PETScWrappers
                                 const std::string &value)
   {
 #if DEAL_II_PETSC_VERSION_LT(3, 7, 0)
-    PetscOptionsSetValue (name.c_str (), value.c_str ());
+    const PetscErrorCode ierr = PetscOptionsSetValue (name.c_str (), value.c_str ());
 #else
-    PetscOptionsSetValue (NULL, name.c_str (), value.c_str ());
+    const PetscErrorCode ierr = PetscOptionsSetValue (NULL, name.c_str (), value.c_str ());
 #endif
+    (void)ierr;
+    Assert (ierr == 0, ExcPETScError(ierr));
   }
 
 

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.