The Application-Died Event
The Application-Died Event
If an application launched by your application terminates, either normally or
as the result of an error, the Process Manager can notify your application
by sending it an Apple event-the Application Died event. To receive this
notification, you must set the acceptAppDiedEvents flag in your application's
'SIZE' resource. The Application Died event has an event class of
kCoreEventClass and an event id of kAEApplicationDied.
The Process Manager gets the value of the keyErrorNumber parameter
from the system global variable DSErrCode. This value can be set either by the
application before it terminates or by the Operating System (which can occur
as the result of a hardware exception or other problem).