---
name: "std::filesystem::filesystem_error"
section: "3cxx"
platform: "linux"
package: "libstdc++-12-doc"
version: "12.4.0-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/std::filesystem::filesystem_error/3cxx"
---

# std::filesystem::filesystem\_error(3cxx)

Exception type thrown by the Filesystem library.

## NAME

std::filesystem::filesystem\_error - Exception type thrown by the Filesystem library.

## SYNOPSIS

`#include <filesystem>`

Inherits **std::system\_error**.

### Public Member Functions

**filesystem\_error** (const **filesystem\_error** &)=**default**\
 **filesystem\_error** (const **string** &**\_\_what\_arg**, const **path** &**\_\_p1**, const **path** &**\_\_p2**, **error\_code** **\_\_ec**)\
 **filesystem\_error** (const **string** &**\_\_what\_arg**, const **path** &**\_\_p1**, **error\_code** **\_\_ec**)\
 **filesystem\_error** (const **string** &**\_\_what\_arg**, **error\_code** **\_\_ec**)\
 const **error\_code** & **code** () const noexcept\
 **filesystem\_error** & **operator=** (const **filesystem\_error** &)=**default**\
 const **path** & **path1** () const noexcept\
 const **path** & **path2** () const noexcept\
 const char \* **what** () const noexcept\

## Detailed Description

Exception type thrown by the Filesystem library.

**Since**

C++17

## Member Function Documentation

### const char \* std::filesystem::filesystem\_error::what () const` [virtual]`, ` [noexcept]`

Returns a C-style character string describing the general cause of the current error (the same string passed to the ctor). \

Reimplemented from **std::runtime\_error**.

References **std::make\_error\_code()**.

## Author

Generated automatically by Doxygen for libstdc++ from the source code.
