---
name: "std::filesystem_filesystem_error"
section: "3cxx"
platform: "linux"
package: "libstdc++-11-doc"
version: "11.3.0-12"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/std::filesystem_filesystem_error"
---

# 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 <fs_path.h>`

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.

Definition at line **704** of file **bits/fs\_path.h**.

## Member Function Documentation

### const error\_code & std::system\_error::code () const` [inline]`, ` [noexcept]`, ` [inherited]`

Definition at line **480** of file **system\_error**.

### 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**.

## Author

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