https://issues.dlang.org/show_bug.cgi?id=19602
--- Comment #1 from Eyal <[email protected]> --- If "Errors" mean "bugs" - then it should not unwind the stack and allow catch() handlers to catch them and resume execution, as dtors will be skipped. If error throwing is fine, then "nothrow" should NOT imply no auto-generated exception handling code. It becomes useful only as a declaration of intent for the user, and not useful to the compiler. As long as this bug exists, there's a choice between these 2 options: * Errors should never really be caught - as they run in a completely broken state. * Destructors cannot be trusted in the general case. I see 2 possible fixes: * Ignore nothrow in the compiler codegen. Assume errors can always be thrown, even in nothrow (indeed they can). * Replace throwing/catching Errors with a different mechanism to signal/handle errors without incorrect stack unwinding. --
