Trailing catch on function?

Daniel N via Digitalmars-d digitalmars-d at puremagic.com
Wed Nov 9 01:49:08 PST 2016


On Tuesday, 8 November 2016 at 16:02:25 UTC, Manu wrote:
> scope(failure) doesn't catch... how is that function nothrow?

Seems like you overlooked Anonymouse's comment? scope(failure) 
catches just fine.

scope(failure) return -1;
throw new Exception("failure");
return 0;

This will return -1, with no need for extra indentation.



More information about the Digitalmars-d mailing list