What class members do Throwable and Exception have in the D programming language?

303 views Asked by At

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.

1

There are 1 answers

2
Vladimir Panteleev On BEST ANSWER

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.