bug-gnustep
[Top][All Lists]
Advanced

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

Re: Exception and selector performing


From: Richard Frith-Macdonald
Subject: Re: Exception and selector performing
Date: Tue, 10 Aug 2004 12:17:11 +0100


On 8 Aug 2004, at 20:18, Stefan Urbanek wrote:

Additional information ...

On 2004-08-08 21:13:41 +0200 Stefan Urbanek <stefan@agentfarms.net> wrote:

Hi,
Here is the situation: I have DO connection: [Observer] <-----> [Server]. I do:
1. send oneway message from Observer to Server
2. server does something and uses
    performSelectorOnMainThread:@(notyfyObserver)
    withObject:self
    waitUntilDone:NO'
3. 'notifyObserver' is run in server and it sends a message to Observer
4. when there is an exception in an observer method it is swallowed
And (4.) is the problem, as it is really dificult to debug any application if there is an exception. How do I know that there was an exception?

All used observer methods are oneway, what explains why the exception is ignored. However, there is no feedback at all. At least some message shold be printed or something.

As the method is oneway, there is no way that exceptions can be propagated back to the process which sent the message. Perhaps we can/should change GNUstep to log these exceptions ... but I'm not sure it's really worthwhile. If MacOS-X does this, I'd change the current behavior to improve compatibility, but otherwise I don't think it should be changed.

For the purposes of debugging softwaqre you are working on the solution is trivial ... just use an exception handler in the observer method to trap any exceptions and print an error message.





reply via email to

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