Java also has chained exceptions, done manually
Neia Neutuladh
neia at ikeran.org
Sun Sep 9 01:53:48 UTC 2018
On Sunday, 9 September 2018 at 01:09:24 UTC, Andrei Alexandrescu
wrote:
> it does stand to reason to print the last exception in a chain,
> instead of the head, as the most relevant cause. Guess we'd do
> good to have such functionality in the stdlib.
So given code like:
scope (exit) throw new Exception("cleanup failed");
throw new Exception("main operation failed");
You would prefer that this show the "cleanup failed" exception
more prominently than the "main operation failed" exception?
More information about the Digitalmars-d
mailing list