Hacker News new | ask | show | jobs
by wmu 2357 days ago
A perfect example of the small-scale-example syndrome. As somebody else noted here, throwing an exception in a noexcept context calls std::terminate. Figuring out why terminate was triggered in a large, multithread program sounds like a funny task until you have to do it by yourself.

The only place for noexcept are getters that return a copy of a POD value or a (const-)reference. Placing noexcept anywhere else is a call for problems.

1 comments

Can the terminate handler examine the stack and/or the thrown exception in order to provide useful clues to the developer, or is it too late by then?
In GCC runtime the terminate handler is called after stack unwinding.