Share via


error_condition Class

Represents user-defined error codes.

class error_condition;

Remarks

An object of type error_condition stores an error code value and a pointer to an object that represents a category of error codes used for reported user-defined errors.

Constructors

error_condition

Constructs an object of type error_condition.

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 condition.

category

Returns the error category.

clear

Clears the error code value and category.

message

Returns the name of the error code.

Operators

operator==

Tests for equality between error_condition objects.

operator!=

Tests for inequality between error_condition objects.

operator<

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

operator=

Assigns a new enumeration value to the error_condition object.

operator bool

Casts a variable of type error_condition.

Requirements

Header: <system_error>

Namespace: std

See Also

Reference

error_category Class

<system_error>