scope() statements and return

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Mon Oct 6 19:26:17 PDT 2014


On Monday, 6 October 2014 at 17:12:00 UTC, Jakob Ovrum wrote:
> On Monday, 6 October 2014 at 16:55:39 UTC, monarch_dodra wrote:
>> For the sake of argument, do you have any examples where a 
>> program has used chaining?
>
> I use explicit chaining in a couple of my libraries, i.e. code 
> like:
>
> ---
> try foo();
> catch(FooException e)
> {
>     throw new BarException("foobar", e);
> }
> ---
>
> However, the whole point is implicit chaining, which is where 
> the language and runtime kicks in. Look through your own 
> scope(exit|failure) blocks and struct destructors - are they 
> all nothrow?
>
> If not, you are using exception chaining.

I think this is supposed to chain the other way around.


More information about the Digitalmars-d mailing list