realbasic-nug
[Top] [All Lists]

Problems with Exceptions (was Re: Bizarre problem with canvas)

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: Problems with Exceptions (was Re: Bizarre problem with canvas)
From: "Mike D." <md at xochi dot com>
Date: Tue, 30 Jul 2002 11:35:21 -0700
Subject: Re: Bizarre problem with canvas
From: "Steve Thomas" <steve dot thomas at innoviatech dot com>
Date: Tue, 30 Jul 2002 10:30:04 +0100

[...]
The problem was that there was actually an unhandled exception in the
constructor of the property that the canvas contained. So in the open event,
the canvas tried to initialise the property, failed and opened up the
debugger. I think this must have been firing the paint event of the canvas,
which then tried to access the property to draw it. This threw up a second
exception. Rather than displaying the original error, the debugger then
jumped to this second error, giving the impression that the open event had
never been run.

This is quite a subtle problem, because I had assumed that once an error is
hit, ALL code execution stopped. However, this is clearly not the case for
the paint event. I should probably RealBug this as it confused the hell out
of me!

[...]
Regards,
Steve Thomas

I've found another problem where exceptions don't work. In OS X, if you have an exception inside a window.showModal call, the exception handler won't catch it until it pops up outside of the showModal call (i.e. you can never get the IDE to open on the line of the exception itself, instead it stops at the showmodal call).

I've also had lots of crashes with exceptions inside of running threads, although I admit I've not tested this much with 4.5.


<Prev in Thread] Current Thread [Next in Thread>