]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add a strangely missing AssertThrow.
authoryoung <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 5 Oct 2013 03:52:30 +0000 (03:52 +0000)
committeryoung <young@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 5 Oct 2013 03:52:30 +0000 (03:52 +0000)
git-svn-id: https://svn.dealii.org/trunk@31139 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/lac/petsc_parallel_sparse_matrix.cc

index 6e91035df75019f0ac27841dedef8dd4243e1129..f514ad7d7297a92f32b24d4c14ec87009fc00b4f 100644 (file)
@@ -45,11 +45,14 @@ namespace PETScWrappers
 
     SparseMatrix::~SparseMatrix ()
     {
+      int ierr;
+
 #if DEAL_II_PETSC_VERSION_LT(3,2,0)
-      const int ierr = MatDestroy (matrix);
+      ierr = MatDestroy (matrix);
 #else
-      const int ierr = MatDestroy (&matrix);
+      ierr = MatDestroy (&matrix);
 #endif
+      AssertThrow (ierr == 0, ExcPETScError(ierr));
     }
 
     SparseMatrix::SparseMatrix (const MPI_Comm  &communicator,

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.