So, I've never used an exception before, but I guess there's a first time for everything :P
It seems to be that `Throwable` transcends `nothrow`...
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?
void code() nothrow
{
RAII something;
doesntThrow();
// destroy something
}
void
doesntThrow() nothrow
{
try
canThrow();
catch (Exception)
{
// catch exceptions from canThrow
}
}
void canThrow()
{
throw new Throwable();
}
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?
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?
Am I reading this correctly... or is it actually that unwind tables are just always generated for everything, even `nothrow` things?