Вопрос

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.

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top