scope guards
Sebastiaan Koppe via Digitalmars-d
digitalmars-d at puremagic.com
Sat Aug 9 10:39:46 PDT 2014
On Monday, 4 August 2014 at 04:09:07 UTC, Manu via Digitalmars-d
wrote:
> Almost all exceptions I throw are in relation to bad input
> data, and they are to be caught at a slightly higher level
> of input processing.
I do not know the design that you are using, but it seems to me
that instead of scope, the real problem is that you are using
exceptions to communicate input errors between layers.
> My code has become try/catch-tastic, and I really don't like
> looking at it. It rather sickens me and reminds me of Java...
My knowledge of Java is a little rusty, but do you not do the
same thing, using exceptions for control flow?
More information about the Digitalmars-d
mailing list