Change the name of ArrayBoundsException in druntime

Sean Kelly sean at invisibleduck.org
Wed Oct 22 12:01:36 PDT 2008


Denis Koroskin wrote:
> On Wed, 22 Oct 2008 16:22:02 +0400, Jarrett Billingsley 
> <jarrett.billingsley at gmail.com> wrote:
> 
>> On Wed, Oct 22, 2008 at 6:49 AM, Jacob Carlborg <doobnet at gmail.com> 
>> wrote:
>>> I think the name ArrayBoundsException should be changed to a more 
>>> general
>>> name like BoundsException, OutOfBoundsException or
>>> IndexOutOfBoundsException. Then you can use the exception in every class
>>> that have some sort of index operation and not just for an array/array
>>> class.
>>>
>>
>> 2nded.
> 
> Agreed. BTW, why it is not an Error but Exception?

The Error class was created shortly before release and I didn't get 
around to reclassifying the exceptions in druntime.  From memory though, 
I think that OutOfMemoryException and UtfException should remain as-is, 
but the remaining exceptions should probably be errors.  Any objections?

And as for ArrayBoundsException... how about IndexOutOfBoundsError. 
It's long, but probably the most self-explanatory.  Also, any value in 
retaining ArrayBoundsError and having it subclass this?  I'd think not, 
but figured I'd ask anyway.


Sean



More information about the Digitalmars-d mailing list