scope(failure) compiles but is not called if it inside of block

Neia Neutuladh neia at ikeran.org
Thu Jan 31 20:14:29 UTC 2019


On Thu, 31 Jan 2019 20:05:31 +0000, Denis Feklushkin wrote:
>      {
>          scope(failure) writeln("2");
>      }

This is its own scope. Aside from the `scope(failure)` bit, it contains no 
code. No code means no exceptions are thrown. Therefore the `writeln("2")` 
bit never gets called.


More information about the Digitalmars-d mailing list