std::future_error(3cxx)

πŸ’… std::future_error β€” the manual page, but make it make sense

okay so bestie, welcome to the std::future_error(3cxx) page (that's the manual name right there, iykyk) β€” let's get into it 🫢


✨ NAME ✨

std::future_error β€” the exception type that futures throw at you. literally that's the whole vibe check, she's an exception, she gets thrown by futures πŸ’–


🌸 SYNOPSIS 🌸

#include <future>

Inherits std::logic_error. no cap, that's her whole family tree 🧚

πŸŽ€ Public Member Functions

  • future_error (future_errc __errc) β€” the constructor, takes a future_errc and gets to work
  • const error_code & code () const noexcept β€” hands you back the error_code, noexcept so chill
  • virtual const char * what () const noexcept β€” the iconic description getter, virtual + noexcept ✨

πŸ¦‹ Friends

  • void __throw_future_error (int) β€” yes she has a friend, and yes it returns void and takes an int

πŸ’œ Detailed Description πŸ’œ

Okay so: this is the exception type thrown by futures. That's her entire job. She's giving main character energy in the <future> header and honestly? obsessed 🌈

⭐ Since

C++11 β€” she's been iconic since C++11, periodt πŸ’…


πŸ‘‘ Member Function Documentation πŸ‘‘

πŸ“ virtual const char * std::future_error::what () const [virtual], [noexcept]

Returns a C-style character string describing the general cause of the current error. and like, it's the same string that got passed to the ctor (future_error(future_errc __errc)), so no surprises, fr fr πŸŽ€

Reimplemented from std::logic_error β€” she's doing her own version of the family classic πŸ’–


🌟 Author 🌟

Generated automatically by Doxygen for libstdc++ from the source code. not a human, not a vibe, just Doxygen doing its thing 😭


ngl bestie the whole point is: future throws std::future_error when something goes sideways, you can grab the code(), and what() gives you the cute little C-style string. that's it. that's the page. πŸ’€

okay that's the whole page, hope this slayed for you 🫢 this was std::future_error(3cxx) from libstdc++ β€” mwah, go catch those exceptions bestie πŸ’œπŸŽ€βœ¨

πŸ“¦ where this page comes from