A derived class of logic error the domain_error object is used for exceptions of domain errors.
domain_error(const string& what_arg);
Constructs an object of domain_error. Initializes exception::what to the what_arg argument