nothrow and std.exception.ifThrown

novice2 sorryno at em.ail
Sat May 1 08:56:57 UTC 2021


btw for my immediate needs i replace second delegate with value
i.e. remove "lazy" from declaration and remove "()" in return

so ifThrown loose some generity

```d
nothrow
CommonType!(T1, T2) ifThrown(E : Throwable = Exception, T1, T2)
                             (lazy scope T1 expression, scope T2 
expression2)
...
     try
         return expression();
     catch (E)
         return expression2;
```



More information about the Digitalmars-d-learn mailing list