Re: Weird try block syntax
Re: Weird try block syntax
- Subject: Re: Weird try block syntax
- From: Paul Skinner <email@hidden>
- Date: Fri, 25 Jan 2002 17:57:57 -0500
As an interesting note, the 'on error X' construction disables the
effect of the try block for other errors.
-----------------------------------------------------
try
error -128
on error -127
display dialog " You cancelled!"
end try
-->Execution error -128
-----------------------------------------------------
try
try
error -128
on error -127
display dialog " You cancelled!"
end try
on error
"You did something, but you didn't cancel."
end try
-->"You did something, but you didn't cancel."
-----------------------------------------------------
On Friday, January 25, 2002, at 02:48 PM, Serge Belleudy-d'Espinose
wrote:
At 8:45 -0800 25/01/02, Paul Berkowitz wrote:
try
on error number -n
end
It's a basic feature of AppleScript, and must be in the ASLG, Serge.
Ok, my question was not clear enough. I _know_ about the following
construct:
try
on error number errNum
end try
which puts the error number into the variable errNum, so that you can
test it and use conditional error traping code.
My question is, when I see this:
try
on error number -1708 -- for example
end try
what does it do, does it trap only -1708? I _have_ read ASLG but
couldn't find this construct, nor was I able to get something done with
it. Time to go back to AS school?
Serge
--
Paul Skinner