C++ Exception Library - domain_error



Description

It is a domain error exception.the domain of a mathematical function is the subset of values that it is defined for. For example, the square root function is only defined for non-negative numbers. Thus, a negative number for such a function would qualify as a domain error.

Declaration

Following is the declaration for std::domain_error.

class domain_error;

C++11

class domain_error;

Parameters

none

Return Value

none

Exceptions

No-throw guarantee − no members throw exceptions.

Members

  • constructor − what_arg has the same content as the value returned by member what.

  • what − It is used to get string identifying exception.

exception.htm
Advertisements