errorDialog Message question

Dar Scott dsc at swcp.com
Wed Aug 11 15:58:42 EDT 2004


On Aug 11, 2004, at 1:38 PM, Jerry Daniels wrote:

> How would "try" work so that all statements in the IDE are going 
> through it? Sounds very interesting.

I'm still not explaining this well.

The problem with 'try' it that it would need to be in all handlers for 
events if you want to catch all errors.  The errorDialog approaches 
would be better for getting all errors.

Example:

on mouseUp
     try
        doButtonStuff
     catch e
        doErrorStuff e
     end try
end mouseUp

An error or throw in doButtonStuff, even down deep in functions and 
commands, will bubble up to the catch (if there is no 'try' in 
between).

Using 'try' is fine for a small number of events that you want to 
watch.  It is great for putting at the top of some library functions.

If you are making a new plugin and want to integrate with the IDE, I'm 
not sure what is best, but it sounds like the direction you are going 
will work; I didn't look closely.

Dar Scott



More information about the use-livecode mailing list