-- Case 1
handlerName()
if errNum of the result ≠ 0 then
display dialog "Error " & errNum of the result & ": " & errMsg of the result
else
display dialog "No Error"
end if
--> "Error -1: x"
-- Case 2
if errNum of handlerName() ≠ 0 then
display dialog "Error " & errNum of the result & ": " & errMsg of the result
return
end if
display dialog "No Error"
--> Runtime Error: "Can’t make errNum of "x" into type Unicode text."
on handlerName()
set yyy to "x"
return {errNum:-1, errMsg:yyy}
end handlerName
Steve
------------------
OS X 10.6.8, AppleScript 2.1.2