STD::FILESYSTEM::FILESYSTEM_ERROR(3)

πŸ’– std::filesystem::filesystem_error πŸ’–

okay bestie, welcome to the glow-up of std::files...ystem_error(3) β€” yeah that's the title, straight outta the Library Functions Manual, section 3, no cap. sit down, grab a strawberry πŸ“, we're talking exceptions.


✨ NAME ✨

std::filesystem::filesystem_error β€” the exception type that the Filesystem library throws. that's it, that's the whole personality. she's a thrower. πŸ’…


🌸 SYNOPSIS 🌸

#include <filesystem>

Inherits std::system_error. yes, she's got lineage. main character energy, inherited. πŸ‘‘

πŸŽ€ Public Member Functions πŸŽ€

here's the whole roster, every single one, no skipping:

  • 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. she exists to be thrown. it's giving dramatic exit, and honestly? iconic. 😭

Since

C++17 ✨ (she's not old, she's vintage-adjacent, don't be rude)


πŸ’œ 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. and lowkey the tea is: it's the same string passed to the ctor. so whatever you handed her at construction, that's what she's gonna say back to you. fr fr. πŸ—£οΈ

  • Reimplemented from std::runtime_error. she's over here doing her own version, respectfully. πŸ’…
  • References std::make_error_code().

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for libstdc++ from the source code. so nobody hand-wrote this, a robot did, and the robot ate. πŸ€–πŸ”₯


bestie reminder: she's noexcept on the getters and what(), and inheriting from std::system_error means all that error-code machinery comes along for the ride. no extra claims, just facts, periodt. πŸ’–

and that's a wrap on this little libstdc++ page β€” yeah, libstdc++ is the whole source/version situation, and the page name is that same std::files...ystem_error(3) up top, folded in all cute. mwah. πŸŽ€ bye bestie, go catch your exceptions. πŸ’…βœ¨

πŸ“¦ where this page comes from
  • arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
  • fedora 44: libstdc++-docs 16.0.1-0.10.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • fedora 44: libstdc++-docs 16.2.1-2.fc44
  • fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms