Thank you Imperatron, Ali
both variants
```d
  scope(failure) assert(0);
```
```d
  collectException
```
works!

Thank Meta
The reason for this, apparently, is in the definition of `ifThrown`

i tried to modify ifThrown adding nothrow,
but compiler dont understand, that second parameter cant throw,
it just expression.

i dont understand why (templates too dificult for me yet),
but if i comment "lazy" from T2,
then compiler allow add "nothrow" to "ifThrown"

```d
CommonType!(T1, T2) ifThrown(E : Throwable = Exception, T1, T2)(lazy scope T1 expression, /*lazy*/ scope T2 errorHandler) nothrow
```
https://run.dlang.io/is/KTdd3G

Reply via email to