From: David Wells Date: Tue, 12 Jul 2016 01:13:55 +0000 (-0400) Subject: Add error checking to set_option_value. X-Git-Tag: v8.5.0-rc1~872^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54d656a1956ca24603f5a3bff0482930051990bc;p=dealii.git Add error checking to set_option_value. --- 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)); }