From 7c7527acb9cb91d440f680ca93f19e1eb658a70f Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 12 Sep 2016 05:13:33 -0600 Subject: [PATCH] Provide error texts to more exceptions. Also remove one exception for which an equally named exception is already available and for wihch I'm providing an error text as part of this patch. --- include/deal.II/base/data_out_base.h | 14 ++++++++------ source/base/data_out_base.cc | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/include/deal.II/base/data_out_base.h b/include/deal.II/base/data_out_base.h index bbc88554a5..38725b0040 100644 --- a/include/deal.II/base/data_out_base.h +++ b/include/deal.II/base/data_out_base.h @@ -1861,11 +1861,17 @@ namespace DataOutBase /** * An output function did not receive any patches for writing. */ - DeclException0 (ExcNoPatches); + DeclExceptionMsg (ExcNoPatches, + "You are trying to write graphical data into a file, but " + "no data is available in the intermediate format that " + "the DataOutBase functions require. Did you forget to " + "call a function such as DataOut::build_patches()?"); /** * Exception */ - DeclException0 (ExcTecplotAPIError); + DeclExceptionMsg (ExcTecplotAPIError, + "The error code of one of the Tecplot functions was " + "not zero as expected."); /** * Exception */ @@ -2644,10 +2650,6 @@ public: */ void merge (const DataOutReader &other); - /** - * Exception - */ - DeclException0 (ExcNoPatches); /** * Exception */ diff --git a/source/base/data_out_base.cc b/source/base/data_out_base.cc index 031e4075ac..072c99bd60 100644 --- a/source/base/data_out_base.cc +++ b/source/base/data_out_base.cc @@ -7420,8 +7420,8 @@ merge (const DataOutReader &source) const std::vector source_patches = source.get_patches (); - Assert (patches.size () != 0, ExcNoPatches ()); - Assert (source_patches.size () != 0, ExcNoPatches ()); + Assert (patches.size () != 0, DataOutBase::ExcNoPatches ()); + Assert (source_patches.size () != 0, DataOutBase::ExcNoPatches ()); // check equality of component // names Assert (get_dataset_names() == source.get_dataset_names(), -- 2.39.5