Format of thrown errors; IDE error integration
J. Landman Gay
jacque at hyperactivesw.com
Fri Apr 29 14:28:58 EDT 2005
On 4/29/05 11:46 AM, Dar Scott wrote:
> What is the format of thrown errors? How do I add to the error-code
> list?
Some of it is in the docs under "errorDialog":
> A list of possible execution errors is contained in the "cErrorsList"
> property of the first card of the stack "revErrorDisplay". You can
> view the list with the following statement:
>
> answer the cErrorsList of card 1 of stack "revErrorDisplay"
You should be able to add to this list by altering that card property.
The format is in the form of 3 comma-delimited items, with a possible
fourth item, for example:
573,45,5,sor
I got this error by typing "sor" into the message box, for which there
was no equivalent handler.
Item 1 is the error ID, which corresponds to a line number in the errors
list stored in the revErrorDisplay stack. You'd grab this line in the
errors list to display the text description of the error, which in this
case is "can't find handler".
Item 2 is the line number of the line in the script that errored.
Item 3 is the token that errored in that line.
The fourth item, if there is one, can be the value sent to the handler,
the object that contains the handler, or the name of the message passed
to it. Since each error can produce several lines of error code
messages, the fourth item varies if it exists at all. The "sor" error I
generated actually produced all these lines:
573,45,5,sor
253,41,1
253,40,1
241,40,1,returnInField
353,0,0,field id 1002 of card id 1001 of stack "Message Box" of stack
"/Applications/MetaCard/MetaCard 2.6.1/mctools.mc"
As you can see, I produced this in MetaCard instead of Revolution, since
the error codes and messages are easier to access from MC.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list