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 11:08:54 -0500
On Friday, January 25, 2002, at 07:30 AM, Serge Belleudy-d'Espinose
wrote:
Hi all,
I've just seen this today in a script I'm testing, as well as in
samples from Jon's commands:
try
on error number -n
end
with n being just about any number needed.
I'm not sure what you mean by...
with n being just about any number needed.
this is the construct for on error...
try
set x to word 1 of pi --Generate an error
on error theErrorString number theErrorNumber from theErroringObject to
theExpectedResult partial result theResultsPriorToTheError
return {theErrorString, theErrorNumber, theErroringObject,
theExpectedResult, theResultsPriorToTheError}
try
Which puts the value of the error into the variable following the term
'number'.
--
Paul Skinner