• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Weird try block syntax
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Weird try block syntax (From: "Serge Belleudy-d'Espinose" <email@hidden>)

  • Prev by Date: Re: boldly creating files where no file has been created before (or not...)
  • Next by Date: AS Studio - Variable Troubles - AAAARGHH
  • Previous by thread: Weird try block syntax
  • Next by thread: Re: Weird try block syntax
  • Index(es):
    • Date
    • Thread