Change the name of ArrayBoundsException in druntime

Sergey Gromov snake.scaly at gmail.com
Thu Oct 23 07:08:33 PDT 2008


Thu, 23 Oct 2008 08:45:45 -0500,
Andrei Alexandrescu wrote:
> Sergey Gromov wrote:
> > Wed, 22 Oct 2008 19:18:57 -0400,
> > Jarrett Billingsley wrote:
> >> On Wed, Oct 22, 2008 at 7:13 PM, Sean Kelly <sean at invisibleduck.org> wrote:
> >>> Errors represent situations which are typically non-recoverable--program
> >>> logic errors, for example, or situations where data corruption may have
> >>> occurred--while Exceptions represent the bulk of normal execution errors,
> >>> including OutOfMemory conditions.
> >> How, pray tell, is an app supposed to recover from an out-of-memory condition?
> > 
> > In an image editor, a user asks to create a huge image (50k x 50k).  You 
> > try, run out of memory, and gracefully tell the user that the image was 
> > too big and you didn't succeed.
> 
> I could extract many instances of this pattern from my programs. 
> Unfortunately, current bugs in the compiler, phobos, or both lead to 
> sudden death of the application under certain circumstances. I hope one 
> day I'll get around to investigating that.

I've noticed that failed new sometimes simply returned null instead of 
throwing an exception.  I remember it happened in a 3-line piece of test 
code.



More information about the Digitalmars-d mailing list