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; }; }
The class filesystem_error defines the type of objects thrown as exceptions to report file system errors from functions described in this subclause.
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);
Postconditions: The postconditions of this function are indicated in Table 121.
Expression | Value |
runtime_error::what() | what_arg.c_str() |
code() | ec |
path1() | Reference to stored copy of p1 |
path2() | Reference to stored copy of p2 |
const path& path1() const noexcept;
const path& path2() const noexcept;
const char* what() const noexcept override;