From: Wolfgang Bangerth Date: Sun, 11 Oct 2015 22:31:30 +0000 (-0500) Subject: Get rid of an obscure exception with a poor message. X-Git-Tag: v8.4.0-rc2~325^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9aab714678dd2ddd5d9bdd5d5d08332285e2f18;p=dealii.git Get rid of an obscure exception with a poor message. Instead, use a widely use variant. --- diff --git a/include/deal.II/lac/chunk_sparse_matrix.h b/include/deal.II/lac/chunk_sparse_matrix.h index 039741a956..e27c1bbe80 100644 --- a/include/deal.II/lac/chunk_sparse_matrix.h +++ b/include/deal.II/lac/chunk_sparse_matrix.h @@ -1303,12 +1303,6 @@ public: /** * Exception */ - DeclException1 (ExcInvalidIndex1, - int, - << "The index " << arg1 << " is not in the allowed range."); - /** - * Exception - */ DeclException0 (ExcDifferentChunkSparsityPatterns); /** * Exception @@ -1580,7 +1574,7 @@ number ChunkSparseMatrix::diag_element (const size_type i) const { Assert (cols != 0, ExcNotInitialized()); Assert (m() == n(), ExcNotQuadratic()); - Assert (i::diag_element (const size_type i) const { Assert (cols != 0, ExcNotInitialized()); Assert (m() == n(), ExcNotQuadratic()); - Assert (i::diag_element (const size_type i) { Assert (cols != 0, ExcNotInitialized()); Assert (m() == n(), ExcNotQuadratic()); - Assert (i::set (const size_type row, const bool elide_zero_values) { Assert (cols != 0, ExcNotInitialized()); - Assert (row < m(), ExcInvalidIndex1(row)); + AssertIndexRange(row, m()); // First, search all the indices to find // out which values we actually need to