public pure virtual member function
<system_error>

std::error_category::message

virtual string message (int val) const = 0;
Error message
In derived classes, the function returns a string object with a message describing the error condition denoted by val.

In error_category, it is a pure virtual member function.

This function is called both by error_code::message and error_condition::message to obtain the corresponding message in the category. Therefore, numerical values used by custom error codes and error conditions should only match for a category if they describe the same error.

Parameters

val
A numerical value identifying an error condition.
If the error_category object is the generic_category, this argument is equivalent to an errno value (see errc for a list of standard values).

Return Value

A string object with the message.

Example

For an example, see error_category.

See also