collectException range violation
cal
callumenator at gmail.com
Tue Feb 19 17:32:09 PST 2013
On Wednesday, 20 February 2013 at 01:19:54 UTC, Ali Çehreli wrote:
> The example is wrong. a[4] throws an Error (not Exception) but
> collectException catches Exception by default.
>
> Additionally, the example is doing something that is
> recommended against: Catching Error or a descendent of it.
>
> Still, it can be told to catch by Error:
>
> assert(collectException!Error(a[4], b));
>
> Ali
Ah right I didn't realize it could be made to collect an Error.
Thanks!
More information about the Digitalmars-d-learn
mailing list