gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Allowing Applications to continue after exception...


From: David Ayers
Subject: Re: Allowing Applications to continue after exception...
Date: Fri, 06 Feb 2009 11:13:33 +0100

Am Mittwoch, den 04.02.2009, 23:44 -0800 schrieb Matt Rice:
> On Wed, Feb 4, 2009 at 9:50 PM, David Ayers <address@hidden> wrote:
> > I still believe that handling generic handling of exceptions in the
> > runloop is a dangerously wrong and an implementation detail that we
> > shouldn't try to be compatible with.  But others may disagree.
> 
> I definitely agree with this, but wanted to toss out another point of
> view in the same vein
> in an editor application, say that there is an exception when working
> with a single document
> (i'm seeing something in DBModeler when closing certain documents
> which I haven't managed to fix yet unfortunately)
> 
> so i'm getting an exception when an error occurs in a single document,
> but the entire application crashes, now i should probably add some
> exception handling somewhere (not exactly sure where, probably all
> over the place...) to my app but haven't figured out where yet, but
> until I do, an exception in a single document means that all open
> documents close, and could potentially lose changes in other unsaved
> documents which are open.

Indeed, an exception could cause data corruption in a single document.
It may not cause any data corruption at all.  But it could also cause
corruption in all documents.  We simply cannot tell.

DBModeler should handle Exceptions where external or internal code can
reasonably be expected to raise an exception.  It should not be handle
"defensively" due to unimplemented / buggy code in DBModeler or GDL2 (or
any other dependent code).

For development I think it's fine to use:
defaults write DBModeler NSExceptionHandlingMask 63
Maybe we should also log this workaround the when we crash, so that a
user can also decide to use it for future crashes.

But I guess that means that we need to link a against the
ExceptionHandling framework (which we still need to create for GNUstep
even if it merely contains this single feature for now).
That way the user can set the preferred handling.

Cheers,
David






reply via email to

[Prev in Thread] Current Thread [Next in Thread]