Question

I'm particularly interested, how I can produce nested exception and how I can access those afterwards when I handle them. A link to some documentation would be appreciated. I have already tried to find it on the D website. No success though. I'm particularly interested in D2.

Was it helpful?

Solution

Throwable documentation: http://dlang.org/phobos/object.html#Throwable

Throwable is implemented here: https://github.com/D-Programming-Language/druntime/blob/master/src/object_.d#L1304

Exception, which is currently not documented, is a subclass of Throwable with no new fields or methods.

Error, which is currently also not documented, is a subclass of Throwable with one new field: bypassedException, which is documented as following:

The first Exception which was bypassed when this Error was thrown, or null if no Exceptions were pending.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top