scope() statements and return

Jakob Ovrum via Digitalmars-d digitalmars-d at puremagic.com
Mon Oct 6 10:11:58 PDT 2014


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.


More information about the Digitalmars-d mailing list