On Tuesday, 12 December 2017 at 18:34:26 UTC, Mike Wey wrote:
On 12-12-17 00:35, Seb wrote:
D style would be to use sth. like this (instead of try/catch):
```
scope(failure) {
e.msg.writeln;
1.exit;
}
```
I might have missed something, but where is `e` defined in this
case?
I was thinking the same and can't find anything in the
documentation that states you can retrieve the exception that
caused the failure by an "e" variable.
All I could find is that in case you need to use the exception
you'd have to do a try/catch.
So ultimately that code wouldn't work, according to the language
specs.
I haven't tested it, so I don't know if it's some hidden feature,
but if it is, then I'm against it.