Library exceptions

Logic error

class integration_logic_error : public std::logic_error

Defines a type of object to be thrown as exception. It reports errors that occur during the integration routine of integratecpp::integrator::operator()() and that are a consequence of faulty logic within the program such as violating logical preconditions or class invariants and may be preventable.

Subclassed by integratecpp::invalid_input_error

Public Functions

inline explicit integration_logic_error(const std::string what, const integrator::return_type &result)

A full constructor, specifying the error message with std::string.

Parameters:
inline explicit integration_logic_error(const char *what, const integrator::return_type &result)

A full constructor, specifying the error message with const char *.

Parameters:
  • what – a const char * containing a pointer a const char[] with the error message.

  • result – a integratecpp::integrator::return_type with the integration results at the time of error.

inline virtual integrator::return_type result() const noexcept

Accessor the the result at the time or error.

class invalid_input_error : public integratecpp::integration_logic_error

Defines a type of object to be thrown as exception. It reports errors that occur during the integration routine of integratecpp::integrator::operator()() if the integral is probably divergent, or slowly convergent. if the input is invalid.

This could be because (absolute_accuracy <= 0 and relative_accuracy < max(50*rel.mach.acc.,0.5d-28)) or max_subdivisions < 1 or work_size < max_subdivisions*4. Result, absolute_error, neval, last are set to zero.

Public Functions

inline explicit integration_logic_error(const std::string what, const integrator::return_type &result)

A full constructor, specifying the error message with std::string.

Parameters:
inline explicit integration_logic_error(const char *what, const integrator::return_type &result)

A full constructor, specifying the error message with const char *.

Parameters:
  • what – a const char * containing a pointer a const char[] with the error message.

  • result – a integratecpp::integrator::return_type with the integration results at the time of error.

Runtime error

class integration_runtime_error : public std::runtime_error

Defines a type of object to be thrown as exception. It reports errors that occur during the integration routine of integratecpp::integrator::operator()() and are due to events beyond the scope of the program and not easily predicted.

Subclassed by integratecpp::bad_integrand_error, integratecpp::divergence_error, integratecpp::extrapolation_roundoff_error, integratecpp::max_subdivision_error, integratecpp::roundoff_error

Public Functions

inline explicit integration_runtime_error(const std::string what, const integrator::return_type &result)

A full constructor, specifying the error message with std::string.

Parameters:
inline explicit integration_runtime_error(const char *what, const integrator::return_type &result)

A full constructor, specifying the error message with const char *.

Parameters:
  • what – a const char * containing a pointer a const char[] with the error message.

  • result – a integratecpp::integrator::return_type with the integration results at the time of error.

inline virtual integrator::return_type result() const noexcept

Accessor the the result at the time or error.

class max_subdivision_error : public integratecpp::integration_runtime_error

Defines a type of object to be thrown as exception. It reports errors that occur during the integration routine of integratecpp::integrator::operator()() if the maximum number of subdivisions allowed has been achieved.

One can allow more subdivisions by increasing the value of max_subdivisions (and taking the according dimension adjustments into account). However, if this yields no improvement it is advised to analyze the integrand in order to determine the integration difficulties. If the position of a local difficulty can be determined (e.g. singularity, discontinuity within the interval) one will probably gain from splitting up the interval at this point and calling the integrator on the sub-ranges. If possible, an appropriate special-purpose integrator should be used, which is designed for handling the type of difficulty involved.

Public Functions

inline explicit integration_runtime_error(const std::string what, const integrator::return_type &result)

A full constructor, specifying the error message with std::string.

Parameters:
inline explicit integration_runtime_error(const char *what, const integrator::return_type &result)

A full constructor, specifying the error message with const char *.

Parameters:
  • what – a const char * containing a pointer a const char[] with the error message.

  • result – a integratecpp::integrator::return_type with the integration results at the time of error.

class roundoff_error : public integratecpp::integration_runtime_error

Defines a type of object to be thrown as exception. It reports errors that occur during the integration routine of integratecpp::integrator::operator()() or integratecpp::integrate() if the occurrence of roundoff error is detected, which prevents the requested tolerance from being achieved.

The error may be under-estimated.

Public Functions

inline explicit integration_runtime_error(const std::string what, const integrator::return_type &result)

A full constructor, specifying the error message with std::string.

Parameters:
inline explicit integration_runtime_error(const char *what, const integrator::return_type &result)

A full constructor, specifying the error message with const char *.

Parameters:
  • what – a const char * containing a pointer a const char[] with the error message.

  • result – a integratecpp::integrator::return_type with the integration results at the time of error.

class bad_integrand_error : public integratecpp::integration_runtime_error

Defines a type of object to be thrown as exception. It reports errors that occur during the integration routine of integratecpp::integrator::operator()() if extremely bad integrand behaviour occurs at some points of the integration interval.

Public Functions

inline explicit integration_runtime_error(const std::string what, const integrator::return_type &result)

A full constructor, specifying the error message with std::string.

Parameters:
inline explicit integration_runtime_error(const char *what, const integrator::return_type &result)

A full constructor, specifying the error message with const char *.

Parameters:
  • what – a const char * containing a pointer a const char[] with the error message.

  • result – a integratecpp::integrator::return_type with the integration results at the time of error.

class extrapolation_roundoff_error : public integratecpp::integration_runtime_error

Defines a type of object to be thrown as exception. It reports errors that occur during the integration routine of integratecpp::integrator::operator()() if the algorithm does not converge. roundoff error is detected in the extrapolation table.

It is assumed that the requested tolerance cannot be achieved, and that the returned result is the best which can be obtained.

Public Functions

inline explicit integration_runtime_error(const std::string what, const integrator::return_type &result)

A full constructor, specifying the error message with std::string.

Parameters:
inline explicit integration_runtime_error(const char *what, const integrator::return_type &result)

A full constructor, specifying the error message with const char *.

Parameters:
  • what – a const char * containing a pointer a const char[] with the error message.

  • result – a integratecpp::integrator::return_type with the integration results at the time of error.

class divergence_error : public integratecpp::integration_runtime_error

Defines a type of object to be thrown as exception. It reports errors that occur during the integration routine of integratecpp::integrator::operator()() if the integral is probably divergent, or slowly convergent.

It must be noted that divergence can occur with any other value of ier.

Public Functions

inline explicit integration_runtime_error(const std::string what, const integrator::return_type &result)

A full constructor, specifying the error message with std::string.

Parameters:
inline explicit integration_runtime_error(const char *what, const integrator::return_type &result)

A full constructor, specifying the error message with const char *.

Parameters:
  • what – a const char * containing a pointer a const char[] with the error message.

  • result – a integratecpp::integrator::return_type with the integration results at the time of error.