[format.error]

# 28 Text processing library [[text]](./#text)

## 28.5 Formatting [[format]](format#error)

### 28.5.10 Class format_error [format.error]

[ð](#lib:format_error)

namespace std {class format_error : public runtime_error {public:constexpr explicit format_error(const string& what_arg); constexpr explicit format_error(const char* what_arg); };}

[1](#1)

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

The class format_error defines the type of objects thrown as
exceptions to report errors from the formatting library[.](#1.sentence-1)

[ð](#lib:format_error,constructor)

`constexpr format_error(const string& what_arg);
`

[2](#2)

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

*Postconditions*: strcmp(what(), what_arg.c_str()) == 0[.](#2.sentence-1)

[ð](#itemdecl:2)

`constexpr format_error(const char* what_arg);
`

[3](#3)

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

*Postconditions*: strcmp(what(), what_arg) == 0[.](#3.sentence-1)
