# std::filesystem::filesystem_error

From cppreference.com
< cpp‎ | filesystem

Defined in header `<filesystem>` |  |
class filesystem_error; |  | (since C++17)

The class `std::filesystem::filesystem_error` defines an exception object that is thrown on failure by the throwing overloads of the functions in the filesystem library.

Inheritance diagram

### Member functions

(constructor) | constructs the error object (public member function)
path1 path2 | returns the paths that were involved in the operation that caused the error (public member function)
what | returns the explanatory string (public member function)

## Inherited from std::system_error

### Member functions

code | returns error code (public member function of `std::system_error`)
what [virtual] | returns explanatory string (virtual public member function of `std::system_error`)

## Inherited from std::runtime_error

## Inherited from std::exception

### Member functions

(destructor) [virtual] | destroys the exception object (virtual public member function of `std::exception`)
what [virtual] | returns an explanatory string (virtual public member function of `std::exception`)

### Example

| This section is incomplete Reason: no example

Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/filesystem/filesystem_error&oldid=105034"