scope() statements and return
via Digitalmars-d
digitalmars-d at puremagic.com
Tue Oct 7 03:56:18 PDT 2014
On Tuesday, 7 October 2014 at 07:36:56 UTC, monarch_dodra wrote:
> "happening". Do you have any examples of someone actually
> "dealing" with all the exceptions in a chain in a catch, or
> actually using the information in a manner that is more than
> just printing?
I've never used it myself in real code, but I think the "swallow
concurrent exceptions" is very difficult to reason about, because
it might be a side effect and not a primary cause.
Capturing the origin for a rethrow is potentially useful since it
can tell you whether you should retry or not.
If the cause is a "network unavailable" then you might want to
retry.
If the cause is a type error you might want to log an error and
bail out.
More information about the Digitalmars-d
mailing list