public pure virtual member function

std::error_category::message

<system_error>
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 one returned by generic_category, this value corresponds to one of the values defined in <cerrno>.

Return Value

A string object with the message.

Example

For an example, see error_category class definition.

See also