Name
domain_error class — Arithmetic domain error
Synopsis
class domain_error : public logic_error { public: explicit domain_error(const string& what_arg); };
The domain_error
class is
used to report domain errors, that is, arguments to functions that
are outside the valid domain for input to the functions. For
example, a function that converts a color from the Hue, Saturation,
Lightness colorspace to the Red, Green, Blue colorspace might
require a Saturation in the range [0.0, 1.0] and throw domain_error
for any other value.
See Also
Get C++ In a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.