Need an example of how to use "try" and "catch"
Peter M. Brigham, MD
pmbrig at gmail.com
Thu Mar 22 14:20:51 EDT 2012
On Mar 22, 2012, at 1:32 PM, J. Landman Gay wrote:
> On 3/22/12 12:21 PM, Jim Hurley wrote:
>> Thanks Peter.
>>
>> The problem now is what do these bloody error numbers translate into.
>> Is the a list somewhere?
>
> The list is explained in the "errordialog" entry in the dictionary. You can retrieve the list with the line of script the dictionary provides.
>
> There is also this utility for manual lookups:
> <http://dl.dropbox.com/u/23431607/LiveCode%20Error%20Lookup.livecode.zip>
Or, here's something for your library, so you can call it from a script or from the message box:
function expandError tErr
repeat for each line e in tErr
put item 1 of e into errNbr
put item 2 of e into tLineNbr
put item 3 of e into tCharNbr
put errNbr & " (line" && tLineNbr & "," && "char" && tCharNbr & "):" && \
line errNbr of the cErrorsList of card 1 of stack "revErrorDisplay" \
into tErrMsg
put tErrMsg & cr after errorlist
end repeat
if char -1 of errorlist = cr then delete char -1 of errorlist
return errorlist
end expandError
-- Peter
Peter M. Brigham
pmbrig at gmail.com
http://home.comcast.net/~pmbrig
More information about the use-livecode
mailing list