Skip to content

Comment on JVM exceptions are weird: a decompiler perspectiveparent

Comments

I thought destructors were all noexcept now...

Destructors are noexcept by default, but that can be overridden with noexcept(false).

or at the very least if you didn't noexcept, and then threw something, it just killed the process.

IIRC throwing out of a destructor that's marked noexcept(false) terminates the process only if you're already unwinding from something else. Otherwise the exception should be thrown "normally".

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.