The logic_error class is derived from the Class exception and is used for exceptions that are detectable before program execution.
logic_error(const string& what_arg);
Constructs an object of class logic_error. Initializes exception::what to the what_arg argument.