Share via


error_code Class

Represents low-level system errors that are implementation-specific.

class error_code;

Remarks

An object of type error_code class stores an error code value and a pointer to an object that represents a category of error codes that describe reported low-level system errors.

Constructors

error_code

Constructs an object of type error_code.

Typedefs

value_type

A type that represents the stored error code value.

Member Functions

assign

Assigns an error code value and category to an error code.

category

Returns the error category.

clear

Clears the error code value and category.

default_error_condition

Returns the default error condition.

message

Returns the name of the error code.

Operators

operator==

Tests for equality between error_code objects.

operator!=

Tests for inequality between error_code objects.

operator<

Tests if the error_code object is less than the error_code object passed in for comparison.

operator=

Assigns a new enumeration value to the error_code object.

operator bool

Casts a variable of type error_code.

Requirements

Header: <system_error>

Namespace: std

See Also

Reference

error_category Class

<system_error>