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!