DIP33: A standard exception hierarchy
Ali Çehreli
acehreli at yahoo.com
Thu Apr 4 14:13:55 PDT 2013
On 04/04/2013 12:16 PM, Ali Çehreli wrote:
> core.exception.RangeError at deneme(125887): Range violation
I have realized something: Maybe some of the confusion here is due to
range violation being an Error.
I think that it should be an Exception. The rationale is, some function
is told to provide the element at index 100 and there is no such
element. The function cannot accomplish that task so it throws an
Exception. (Same story for popFront() of an empty range.)
My earlier comments about invalid program state apply to Error
conditions. (Come to think of it, perhaps even more specifically to
AssertError.)
Ali
More information about the Digitalmars-d
mailing list