From 54d656a1956ca24603f5a3bff0482930051990bc Mon Sep 17 00:00:00 2001 From: David Wells Date: Mon, 11 Jul 2016 21:13:55 -0400 Subject: [PATCH] Add error checking to set_option_value. --- include/deal.II/lac/petsc_compatibility.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/deal.II/lac/petsc_compatibility.h b/include/deal.II/lac/petsc_compatibility.h index 3968c2ae98..c41df420a4 100644 --- a/include/deal.II/lac/petsc_compatibility.h +++ b/include/deal.II/lac/petsc_compatibility.h @@ -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)); } -- 2.39.5