[fs.class.filesystem.error.general]

# 31 Input/output library [[input.output]](./#input.output)

## 31.12 File systems [[filesystems]](filesystems#fs.class.filesystem.error.general)

### 31.12.7 Class filesystem_error [[fs.class.filesystem.error]](fs.class.filesystem.error#general)

#### 31.12.7.1 General [fs.class.filesystem.error.general]

[ð](#lib:filesystem_error)

namespace std::filesystem {class filesystem_error : public system_error {public: filesystem_error(const string& what_arg, error_code ec);
 filesystem_error(const string& what_arg, const path& p1, error_code ec);
 filesystem_error(const string& what_arg, const path& p1, const path& p2, error_code ec); const path& path1() const noexcept; const path& path2() const noexcept; const char* what() const noexcept override; };}

[1](#1)

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

The class filesystem_error defines the type of
objects thrown as exceptions to report file system errors from functions described in
subclause [[filesystems]](filesystems "31.12 File systems")[.](#1.sentence-1)
