From c8fed32879b7d99946e3ef43bc6adc3ef15dbb52 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 4 Aug 2015 12:32:58 -0500 Subject: [PATCH] Improve the error message for copying and adding sparse matrices with different sparsity patterns. --- include/deal.II/lac/sparse_matrix.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/deal.II/lac/sparse_matrix.h b/include/deal.II/lac/sparse_matrix.h index e234a03746..6485675fa5 100644 --- a/include/deal.II/lac/sparse_matrix.h +++ b/include/deal.II/lac/sparse_matrix.h @@ -1516,7 +1516,11 @@ public: /** * Exception */ - DeclException0 (ExcDifferentSparsityPatterns); + DeclExceptionMsg (ExcDifferentSparsityPatterns, + "When copying one sparse matrix into another, " + "or when adding one sparse matrix to another, " + "both matrices need to refer to the same " + "sparsity pattern."); /** * Exception */ -- 2.39.5