[syserr.errcode.observers]

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

## 19.5 System error support [[syserr]](syserr#errcode.observers)

### 19.5.4 Class error_code [[syserr.errcode]](syserr.errcode#observers)

#### 19.5.4.4 Observers [syserr.errcode.observers]

[ð](#lib:value,error_code)

`int value() const noexcept;
`

[1](#1)

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

*Returns*: *val_*[.](#1.sentence-1)

[ð](#lib:category,error_code)

`const error_category& category() const noexcept;
`

[2](#2)

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

*Returns*: **cat_*[.](#2.sentence-1)

[ð](#lib:default_error_condition,error_code)

`error_condition default_error_condition() const noexcept;
`

[3](#3)

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

*Returns*: category().default_error_condition(value())[.](#3.sentence-1)

[ð](#lib:message,error_code)

`string message() const;
`

[4](#4)

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

*Returns*: category().message(value())[.](#4.sentence-1)

[ð](#lib:operator_bool,error_code)

`explicit operator bool() const noexcept;
`

[5](#5)

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

*Returns*: value() != 0[.](#5.sentence-1)
