diff --git a/include/boost/accumulators/statistics/extended_p_square_quantile.hpp b/include/boost/accumulators/statistics/extended_p_square_quantile.hpp index a17843d..d5a610c 100644 --- a/include/boost/accumulators/statistics/extended_p_square_quantile.hpp +++ b/include/boost/accumulators/statistics/extended_p_square_quantile.hpp @@ -113,7 +113,7 @@ namespace impl std::ostringstream msg; msg << "probability = " << this->probability << " is not in valid range ("; msg << *this->probabilities.begin() << ", " << *(this->probabilities.end() - 1) << ")"; - boost::throw_exception(std::runtime_error(msg.str())); + boost::throw_exception(std::logic_error(msg.str())); return Sample(0); } diff --git a/include/boost/accumulators/statistics/peaks_over_threshold.hpp b/include/boost/accumulators/statistics/peaks_over_threshold.hpp index f04f743..32e844e 100644 --- a/include/boost/accumulators/statistics/peaks_over_threshold.hpp +++ b/include/boost/accumulators/statistics/peaks_over_threshold.hpp @@ -14,7 +14,7 @@ #include #include // pow #include // stringstream -#include // runtime_error +#include // logic_error #include #include #include @@ -257,7 +257,7 @@ namespace impl { std::ostringstream msg; msg << "index n = " << n << " is not in valid range [0, " << tail(args).size() << ")"; - boost::throw_exception(std::runtime_error(msg.str())); + boost::throw_exception(std::logic_error(msg.str())); return boost::make_tuple(Sample(0), Sample(0), Sample(0)); } } diff --git a/include/boost/accumulators/statistics/tail_mean.hpp b/include/boost/accumulators/statistics/tail_mean.hpp index 67dae37..42aa6ff 100644 --- a/include/boost/accumulators/statistics/tail_mean.hpp +++ b/include/boost/accumulators/statistics/tail_mean.hpp @@ -154,7 +154,7 @@ namespace impl { std::ostringstream msg; msg << "index n = " << n << " is not in valid range [0, " << tail(args).size() << ")"; - boost::throw_exception(std::runtime_error(msg.str())); + boost::throw_exception(std::logic_error(msg.str())); return Sample(0); } } diff --git a/include/boost/accumulators/statistics/tail_quantile.hpp b/include/boost/accumulators/statistics/tail_quantile.hpp index 9ff56b5..3bb1d8d 100644 --- a/include/boost/accumulators/statistics/tail_quantile.hpp +++ b/include/boost/accumulators/statistics/tail_quantile.hpp @@ -93,7 +93,7 @@ namespace impl { std::ostringstream msg; msg << "index n = " << n << " is not in valid range [0, " << tail(args).size() << ")"; - boost::throw_exception(std::runtime_error(msg.str())); + boost::throw_exception(std::logic_error(msg.str())); return Sample(0); } } diff --git a/include/boost/accumulators/statistics/tail_variate_means.hpp b/include/boost/accumulators/statistics/tail_variate_means.hpp index d34d4ab..acb0a05 100644 --- a/include/boost/accumulators/statistics/tail_variate_means.hpp +++ b/include/boost/accumulators/statistics/tail_variate_means.hpp @@ -135,7 +135,7 @@ namespace impl { std::ostringstream msg; msg << "index n = " << n << " is not in valid range [0, " << tail(args).size() << ")"; - boost::throw_exception(std::runtime_error(msg.str())); + boost::throw_exception(std::logic_error(msg.str())); } } return make_iterator_range(this->tail_means_); diff --git a/include/boost/accumulators/statistics/weighted_peaks_over_threshold.hpp b/include/boost/accumulators/statistics/weighted_peaks_over_threshold.hpp index 418b38c..18a00a4 100644 --- a/include/boost/accumulators/statistics/weighted_peaks_over_threshold.hpp +++ b/include/boost/accumulators/statistics/weighted_peaks_over_threshold.hpp @@ -191,7 +191,7 @@ namespace impl { std::ostringstream msg; msg << "index n = " << n << " is not in valid range [0, " << tail(args).size() << ")"; - boost::throw_exception(std::runtime_error(msg.str())); + boost::throw_exception(std::logic_error(msg.str())); return boost::make_tuple(Sample(0), Sample(0), Sample(0)); } } diff --git a/include/boost/accumulators/statistics/weighted_tail_mean.hpp b/include/boost/accumulators/statistics/weighted_tail_mean.hpp index bae8530..0ee64fb 100644 --- a/include/boost/accumulators/statistics/weighted_tail_mean.hpp +++ b/include/boost/accumulators/statistics/weighted_tail_mean.hpp @@ -114,7 +114,7 @@ namespace impl { std::ostringstream msg; msg << "index n = " << n << " is not in valid range [0, " << tail(args).size() << ")"; - boost::throw_exception(std::runtime_error(msg.str())); + boost::throw_exception(std::logic_error(msg.str())); return result_type(0); } } diff --git a/include/boost/accumulators/statistics/weighted_tail_quantile.hpp b/include/boost/accumulators/statistics/weighted_tail_quantile.hpp index b143457..f33e1ea 100644 --- a/include/boost/accumulators/statistics/weighted_tail_quantile.hpp +++ b/include/boost/accumulators/statistics/weighted_tail_quantile.hpp @@ -98,7 +98,7 @@ namespace impl { std::ostringstream msg; msg << "index n = " << n << " is not in valid range [0, " << tail(args).size() << ")"; - boost::throw_exception(std::runtime_error(msg.str())); + boost::throw_exception(std::logic_error(msg.str())); return Sample(0); } } diff --git a/include/boost/accumulators/statistics/weighted_tail_variate_means.hpp b/include/boost/accumulators/statistics/weighted_tail_variate_means.hpp index 2c90783..225586b 100644 --- a/include/boost/accumulators/statistics/weighted_tail_variate_means.hpp +++ b/include/boost/accumulators/statistics/weighted_tail_variate_means.hpp @@ -144,7 +144,7 @@ namespace impl { std::ostringstream msg; msg << "index n = " << n << " is not in valid range [0, " << tail(args).size() << ")"; - boost::throw_exception(std::runtime_error(msg.str())); + boost::throw_exception(std::logic_error(msg.str())); } } }