std::nested...throw_nested(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸ’– NAME πŸ’–

okay so bestie, welcome to the std::nested_exception::rethrow_nested page from the C++ Standard Libary πŸ’…. The name line is literally std::nested_exception::rethrow_nested β€” std::nested_exception::rethrow_nested (yes, it said it twice, and honestly? iconic πŸ’€). This function is the one that rethrows the stored exception, and if there’s no stored exception it’s giving std::terminate energy 😭.


✨ Synopsis ✨

[[noreturn]] void rethrow_nested() const;  (since C++11)

so what does it actually do? It rethrows the stored exception πŸ’₯. If there is no stored exceptions (i.e. nested_ptr() returns a null pointer), then std::terminate is called. and that’s the whole plot, bestie 😭.

This slayful signature has been around since C++11 🌈. The [[noreturn]] is literally right there in the signature, so don’t expect it to come back and say hi 🫢.

⚠️ real talk: it rethrows the stored exception. But if there is no stored exceptions (i.e. nested_ptr() returns a null pointer), then std::terminate is called. not a vibe check you want to fail πŸ’€.

πŸŽ€ Parameters πŸŽ€

(none) β€” zero, nada, no arguments, bestie πŸŽ€.


πŸ¦‹ Return value πŸ¦‹

(none) β€” none at all, because [[noreturn]] said what it said πŸ’….


source/version check bestie: http://cppreference.com, date 2024.06.10, page std::nested...throw_nested(3) β€” slay, bye πŸ’–βœ¨

πŸ“¦ where this page comes from