...
Code Block | ||||
---|---|---|---|---|
| ||||
#include <cstdlib> void throwing_func() noexcept(false); void f() { throwing_func(); } int main() { if (0 != std::at_exitatexit(f)) { // Handle error } // ... } |
...
Code Block | ||||
---|---|---|---|---|
| ||||
#include <cstdlib> void throwing_func() noexcept(false); void f() { try { throwing_func(); } catch (...) { // Handle error } } int main() { if (0 != std::at_exitatexit(f)) { // Handle error } // ... } |
...