scope() statements and return
Jakob Ovrum via Digitalmars-d
digitalmars-d at puremagic.com
Fri Oct 3 05:24:11 PDT 2014
On Friday, 3 October 2014 at 04:52:24 UTC, ketmar via
Digitalmars-d wrote:
> On Fri, 03 Oct 2014 04:40:53 +0000
> deadalnix via Digitalmars-d <digitalmars-d at puremagic.com> wrote:
>
>> The throw thing is rather stupid, as the scope statement can
>> call arbitrary function that can itself throw.
> that's why you'd better use collectException() there, i
> presume. ;-)
>
> btw: shouldn't compiler check and reject code that calls
> no-nothrow
> functions in scope(...)? bug/ER?
No, just like destructors can throw, scope statements can throw
too. That's why we have exception chaining.
More information about the Digitalmars-d
mailing list