Catching Errors
Dominikus Dittes Scherkl via Digitalmars-d
digitalmars-d at puremagic.com
Thu Jan 19 06:37:32 PST 2017
On Thursday, 19 January 2017 at 14:29:46 UTC, Jack Stouffer wrote:
> From what I understand, the difference between an Exception and
> and Error is that Errors signal your program has entered into
> an invalid state. For example, going past the end of an array
> and attempting to access that memory. On the flip side,
> Exceptions signal that something out of the ordinary happened,
> but with proper handling the program can go on it's merry way.
> An example being entering 13 as a month in a std.datetime.Date.
>
> If this is the case, would it not make sense to make it illegal
> to catch Errors in @safe code?
I would say yes. This sounds plausible.
More information about the Digitalmars-d
mailing list