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.
Asked
Active
Viewed 297 times
1 Answers
2
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.

Vladimir Panteleev
- 24,651
- 6
- 70
- 114
-
What does it mean, that an exception is bypassed? And what does 'pending' mean in this context? Does it mean a caught exception that is 'forgotten' because an other exception is thrown in the catch-clause? – Ralph Tandetzky Aug 13 '12 at 16:59
-
I believe it is related to `try..finally` and `scope(exit/failure)` blocks, but don't quote me on it. This area does need more documentation. – Vladimir Panteleev Aug 13 '12 at 17:22