Displaying execution errors caught in 'try' during development

Dar Scott dsc at swcp.com
Fri Apr 22 09:04:39 EDT 2005


I tend to do something like this with high-level commands and functions 
in libraries:


on doSomething  a, b, c
   local errorText = ""
   try
     -- do the thing
   catch e
     if item 1 of e is a number then -- not mine
       put "Error:  General" into errorText
     else
       put "Error:  " & e into errorText
     end if
   end try
   return errorText
end doSomething

Well, that is simplified.

The idea is that fatal errors are thrown.  Some errors are explicitly 
thrown.  However, some errors (often caused by my bugs) are thrown by 
the engine or a Revolution library.  The code detects those (I think) 
and creates a generic message.

However, during development, I'd like to see those errors.

I tried throwing the error again if in the IDE.  For some reason that 
didn't work.

An alternative is to display the error.

Anybody know how to redo the error or display the error text?

Dar Scott
-- 
**********************************************
     DSC (Dar Scott Consulting & Dar's Lab)
     http://www.swcp.com/dsc/
     A Sponsor of RevCon West
**********************************************



More information about the use-livecode mailing list