Gregory Casamento wrote:

What should "NSExceptionMask" be implemented as? SHould it be a boolean that determines if we should allow the application to continue or not?

That is to say
* NSExceptionMask = YES - report all exceptions, but continue anyway...
* NSExceptionMask = NO - current behavior

If so, I have a patch almost ready. I'll submit it to the group prior to committing it since a change that is this important needs to have some amount of consensus.

Have a look at Apple's ExceptionHandlingFramework, which is described here:

http://developer.apple.com/documentation/Cocoa/Reference/ ExceptionHandlingFramework/index.html

Implementation of this framework looks very straight forward, and I guess that they simply install the defaultExceptionHandler in the event loop of NSApplication.

The NSExceptionHandlingMask (not NSExceptionMask!) default is described in the accompanying guide that Richard mentioned already:

http://developer.apple.com/documentation/Cocoa/Conceptual/ Exceptions/Exceptions.html

In particular, see the section "Controlling a Program’s Response to Exceptions".

Essentially, NSExceptionHandlingMask is a bit mask that controls whether uncaught exceptions, uncaught system exceptions, and runtime errors are logged and/or handled. The important values (quoted from the above document) are

 #define NSLogUncaughtExceptionMask 1
 #define NSHandleUncaughtExceptionMask 2
 #define NSLogUncaughtSystemExceptionMask 4
 #define NSHandleUncaughtSystemExceptionMask 8
 #define NSLogRuntimeErrorMask 16
 #define NSLogUncaughtRuntimeErrorMask 32

Wolfgang



_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to