From: Wolfgang Bangerth Date: Sun, 15 Mar 2015 06:19:58 +0000 (-0500) Subject: Adjust error messages in the Histogram class. X-Git-Tag: v8.3.0-rc1~369^2~7 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe6d79586a9abbd1d764bbfc36bed84c7b802601;p=dealii.git Adjust error messages in the Histogram class. --- diff --git a/include/deal.II/numerics/histogram.h b/include/deal.II/numerics/histogram.h index 787555d139..889d6253d2 100644 --- a/include/deal.II/numerics/histogram.h +++ b/include/deal.II/numerics/histogram.h @@ -145,15 +145,9 @@ public: /** * Exception. */ - DeclException0 (ExcEmptyData); - /** - * Exception. - */ - DeclException0 (ExcInvalidIntervals); - /** - * Exception. - */ - DeclException0 (ExcInvalidData); + DeclExceptionMsg (ExcEmptyData, + "Your input argument to this function does not appear to " + "have any data in it."); /** * Exception. */ diff --git a/source/numerics/histogram.cc b/source/numerics/histogram.cc index 1b44f221f6..4811b3529f 100644 --- a/source/numerics/histogram.cc +++ b/source/numerics/histogram.cc @@ -56,8 +56,10 @@ void Histogram::evaluate (const std::vector > &values, const unsigned int n_intervals, const IntervalSpacing interval_spacing) { - Assert (values.size() > 0, ExcEmptyData()); - Assert (n_intervals > 0, ExcInvalidIntervals()); + Assert (values.size() > 0, + ExcMessage("Your input data needs to contain at least one input vector.")); + Assert (n_intervals > 0, + ExcMessage("The number of intervals needs to be at least one.")); for (unsigned int i=0; i 0, ExcEmptyData()); Assert (values.size() == y_values_.size(), @@ -216,7 +218,9 @@ void Histogram::evaluate (const Vector &values, void Histogram::write_gnuplot (std::ostream &out) const { AssertThrow (out, ExcIO()); - Assert (!intervals.empty(), ExcEmptyData()); + Assert (!intervals.empty(), + ExcMessage("There is nothing to write into the output file. " + "Did you forget to call the evaluate() function?")); // do a simple 2d plot, if only // one data set is available