<div dir="ltr"><div>So, I've never used an exception before, but I guess there's a first time for everything :P</div><div><br></div><div>It seems to be that `Throwable` transcends `nothrow`...</div><div>Other than proving code correct-ness, the point of `nothrow` as I see it, is to inform the compiler that it doesn't have to synthesise unwind tables for everything in no-throw land... but since Throwable can pass through `nothrow` territory, how are any RAII objects cleaned up while it unwinds?</div><div><br></div><div>void code() nothrow</div><div>{</div><div> RAII something;</div><div><br></div><div> doesntThrow();</div><div><br></div><div> // destroy something</div><div>}</div><div><br></div><div>void
doesntThrow() nothrow</div><div>{</div><div> try</div><div>
canThrow();</div><div> catch (Exception)</div><div> {</div><div> // catch exceptions from canThrow</div><div> }</div><div>}</div><div><br></div><div>void canThrow()</div><div>{</div><div> throw new Throwable();</div><div>}</div><div><br></div><div><br></div><div>I expect that an unwind table should not be generated for code(), and so `RAII something` should not be tidied up if `doesntThrow` actually does throw... is that what's going on here?</div><div><br></div><div>I guess the idea is that Throwable is intended to never be caught, and so we don't really care about tidying up since an abort is imminent?</div><div>Am I reading this correctly... or is it actually that unwind tables are just always generated for everything, even `nothrow` things?</div></div>