From: Toby D. Young Date: Sat, 5 Oct 2013 03:52:30 +0000 (+0000) Subject: Add a strangely missing AssertThrow. X-Git-Tag: v8.1.0~634 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8306eb972a263e19d7632c3092295e974df6a71;p=dealii.git Add a strangely missing AssertThrow. git-svn-id: https://svn.dealii.org/trunk@31139 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/lac/petsc_parallel_sparse_matrix.cc b/deal.II/source/lac/petsc_parallel_sparse_matrix.cc index 6e91035df7..f514ad7d72 100644 --- a/deal.II/source/lac/petsc_parallel_sparse_matrix.cc +++ b/deal.II/source/lac/petsc_parallel_sparse_matrix.cc @@ -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,