Change the name of ArrayBoundsException in druntime

Bill Baxter wbaxter at gmail.com
Wed Oct 22 17:49:35 PDT 2008


On Thu, Oct 23, 2008 at 9:11 AM, Jarrett Billingsley
<jarrett.billingsley at gmail.com> wrote:
> On Wed, Oct 22, 2008 at 8:02 PM, Sean Kelly <sean at invisibleduck.org> wrote:
>> For manual recovery, consider an app that does a great deal of internal
>> caching.  On an OutOfMemory condition the app could clear its caches and
>>  then retry the operation.  This is probably a bad example, but I think the
>> general idea of trapping and recovering from such a state is potentially
>> valid.
>
> I think that's probably a valid thing to try, and considered it after
> posting.  However, without language support for restarting code at the
> point of the 'throw' it seems like it wouldn't be all that useful.

I think a more common recoverable situation would be an app where user
requests opening up a huge image.
The app tries to allocate space for the huge image and fails with
OutOfMemory.  So the app then gives up on creating that huge image and
reports to the user "Can't do that.  Please buy me some more RAM or
turn on some Virtual Memory."  But there's still plenty of memory for
working on the images that are already loaded.  It shouldn't be fatal.

--bb



More information about the Digitalmars-d mailing list