Debugging async

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Debugging async

Günther Schmidt
Hi,

I've got some code that runs asynchronous using AXEventSinks. As soon as
a certain event happens the AXEventSinks triggers a couple of message sends.

However, when these message sends fail, the debugger doesn't come up,
instead I receive only error messages on the Transcript.

Is there some way to have the debugger come up?

Günther


Reply | Threaded
Open this post in threaded view
|

Re: Debugging async

Chris Uppal-3
Günther,
>
> I've got some code that runs asynchronous using AXEventSinks. As soon as
> a certain event happens the AXEventSinks triggers a couple of message
> sends.
>
> However, when these message sends fail, the debugger doesn't come up,
> instead I receive only error messages on the Transcript.

You could try modifying/overriding the default error handler,
AXDispatchImpAbstract>>notifyDispatchError:invoking:, or run your event
handling code with its own error handling trap that catches the error and does
a halt rather than allowing the error to propogate back to
AXDispatchImpAbstract>>Invoke:riid... which is where all errors are trapped and
the default handler is invoked.

The most generic code would, I suppose, look like

    [... handle message ...]
        on: Error
        do: [:err | ^ err defaultAction].

    -- chris