Program logic bugs vs input/environmental errors (checked exceptions)
Marco Leise via Digitalmars-d
digitalmars-d at puremagic.com
Sun Oct 5 08:08:37 PDT 2014
Am Fri, 03 Oct 2014 21:35:01 +0200
schrieb Jacob Carlborg <doob at me.com>:
> On 2014-10-03 14:36, David Nadlinger wrote:
>
> > you are saying that specific exceptions were replaced by enforce? I
> > can't recall something like this happening.
>
> I have no idea about this but I know there are a lot of "enforce" in
> Phobos and it sees to be encouraged to use it. Would be really sad if
> specific exceptions were deliberately replaced with less specific
> exceptions.
Nice, finally someone who actually wants to discern Exception
types. I'm always at a loss as to what warrants its own
exception type. E.g. when looking at network protocols, would
a 503 be a NetworkException, a HTTPException or a
HTTPInternalServerErrorException ?
Where do *you* wish libraries would differentiate?
Or does it really come down to categories like "illegal
argument", "division by zero", "null pointer", "out of memory"
for you?
--
Marco
More information about the Digitalmars-d
mailing list