From c9aab714678dd2ddd5d9bdd5d5d08332285e2f18 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sun, 11 Oct 2015 17:31:30 -0500 Subject: [PATCH] Get rid of an obscure exception with a poor message. Instead, use a widely use variant. --- include/deal.II/lac/chunk_sparse_matrix.h | 8 +------- include/deal.II/lac/sparse_matrix.h | 10 ++-------- include/deal.II/lac/sparse_matrix.templates.h | 2 +- 3 files changed, 4 insertions(+), 16 deletions(-) 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 -- 2.39.5