Trailing catch on function?

Daniel N via Digitalmars-d digitalmars-d at puremagic.com
Tue Nov 8 03:44:59 PST 2016


On Tuesday, 8 November 2016 at 11:24:59 UTC, Anonymouse wrote:
> You can eat the exception by returning in the scope guard. 
> Since it seems to trigger on Throwables it also eats Errors, 
> sadly.
>

Interesting!

Considering this works:
scope(failure) { abort(); return; }

I had expected this to work also:
scope(failure) abort();

But I guess D lacks support for noreturn attribute on abort?



More information about the Digitalmars-d mailing list