L
Laura Stern
Guest
Mike is correct, of course. It is a common misconception that throwing an error out of a UI trigger can (or should) get caught by a CATCH in the block containing the WAIT-FOR statement. But it will not. A CATCH block cannot run unless that block is where the current execution stack is (what would traditionally be called the "program counter"). The only way that a CATCH block associated with the WAIT-FOR block could run is if the WAIT-FOR is over. And clearly that is not the desired effect. Throwing an error out of a UI trigger is essentially throwing an error out to the Windows OS. Since that makes no sense, the AVM traps it and handles it the "old fashioned" way, which is to just put up an error alert box. What people seem to want is a global CATCH block (kind of like a persistent UI trigger) that really has no association with any coded block. It just sort of sits in space and catches errors that are thrown out of UI triggers. But there is no precedent for that in any common language that we know of and there are no plans to introduce such a concept.
Continue reading...
Continue reading...