workaround for exec err dialog?

Richard Gaskin ambassador at fourthworld.com
Mon May 3 11:33:38 EDT 2004


I may have found a workaround for the engine issue in which the error
data param sent with errorDialog contains erroneous information:

I've found that for each erroneous entry the line and column items (#s 2
and 3 respectively) contain 0 (zero).

Can you think of any valid circumstances in which that would be the case?

If not, the following fix (see the line between "##!" will correct the
issue:


----- from cd script of stack "execution error" -------------
on refresh
   local lc, em, tei, teo, ter, tec
   put empty into ei
   put empty into eo
   put empty into er
   put empty into ec
   put empty into et
   put empty into field "Error Message"
   put the executionerror of me & cr after ee
   put the number of lines in ee into lc
   if lc > 100
   then delete line 100 to lc of ee
   if lc < 2 or the number of items in ee < 6 then
     hide button "Script..."
     hide button "Debug..."
     put "thrown error" & cr into field "Error Message"
   end if
   repeat with i = the number of lines in ee down to 1
     get item 1 of line i of ee
     put line it of field "Messages" into em
     if em is "Object Name:" then
       put item 4 of line i of ee into tei
       put the long name of tei into teo
     else
       ###!
       if item 2 of line i of ee = 0 AND item 3 of line i of ee = 0 then
next repeat
       ###!
       put em & cr before field "Error Message"
       if item 2 of line i of ee is not 0 then
         put item 2 of line i of ee into ter
         put item 3 of line i of ee into tec
       end if
       put tei & cr before ei
       put teo & cr before eo
       put ter & cr before er
       put tec & cr before ec
       put item 4 of line i of ee & cr before et
     end if
   end repeat
   delete last char of field "Error Message"
   seterror 1
   set the hilitedLines of field 1 to 1
end refresh


------------------------

-- 
  Richard Gaskin
  Fourth World Media Corporation
  ___________________________________________________________
  Ambassador at FourthWorld.com       http://www.FourthWorld.com





More information about the metacard mailing list