Notifications and exceptions
Notifications and exceptions
- Subject: Notifications and exceptions
- From: Per Persson <email@hidden>
- Date: Wed, 21 Nov 2001 18:36:36 +0100
Hi,
I'm using distributed objects to display output from legacy apps
(written in C). If the server app (ObjC/Cocoa) is shut down for some
reason, I'd like the clients to receive the
NSConnectionDidDieNotification. The problem is that it is received only
when the client tries to send a message and by that time the server has
gone to meet its maker.
I suppose this has to do with the old app not having a Cocoa event
handling mechanism? Anyway, before attempting to intercept the exception
raised when this happens (NSInvalidSendPortException) I thought I'd ask
you guys.
1) Am I correct about the cause of the problem?
2) Is there a workaround?
3) Would there be any problems using an exception handler to restore the
status and then continue running the client?
/Per