range_error class — Arithmetic range error
class range_error : public runtime_error { public: explicit range_error(const string& what_arg); };
The range_error
class can
be used when a function's results would fall outside its valid
range. Note that the <cmath>
functions do not throw any
exceptions, but a third-party math library might throw range_error
for, say, computing a power
that exceeds the limits of its return type.