[syserr.errcat.virtuals]

# 19 Diagnostics library [[diagnostics]](./#diagnostics)

## 19.5 System error support [[syserr]](syserr#errcat.virtuals)

### 19.5.3 Class error_category [[syserr.errcat]](syserr.errcat#virtuals)

#### 19.5.3.2 Virtual members [syserr.errcat.virtuals]

[ð](#lib:name,error_category)

`virtual const char* name() const noexcept = 0;
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/diagnostics.tex#L832)

*Returns*: A string naming the error category[.](#1.sentence-1)

[ð](#lib:default_error_condition,error_category)

`virtual error_condition default_error_condition(int ev) const noexcept;
`

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/diagnostics.tex#L843)

*Returns*: error_condition(ev, *this)[.](#2.sentence-1)

[ð](#lib:equivalent,error_category)

`virtual bool equivalent(int code, const error_condition& condition) const noexcept;
`

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/diagnostics.tex#L854)

*Returns*: default_error_condition(code) == condition[.](#3.sentence-1)

[ð](#lib:equivalent,error_category_)

`virtual bool equivalent(const error_code& code, int condition) const noexcept;
`

[4](#4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/diagnostics.tex#L865)

*Returns*: *this == code.category() && code.value() == condition[.](#4.sentence-1)

[ð](#lib:message,error_category)

`virtual string message(int ev) const = 0;
`

[5](#5)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/diagnostics.tex#L876)

*Returns*: A string that describes the error condition denoted by ev[.](#5.sentence-1)
