• 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: What Does Error Return ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What Does Error Return ?


  • Subject: Re: What Does Error Return ?
  • From: Yvan KOENIG <email@hidden>
  • Date: Fri, 13 Mar 2015 15:26:30 +0100


Le 13/03/2015 à 15:12, Luther Fuller <email@hidden> a écrit :

I looked in the AppleScript dictionary for information on errors and found this ...

error v : Raise an error

error [anything]
[number small integer] : an error number
[partial result list] : any partial result occurring before the error
[from anything] : the object that caused the error
[to anything] : the desired class for a failed coercion

The AppleScript Language Guide, Appendix C gives some examples, but does not give
an example explaining the the meaning and usage of the 'from' and 'to' parameters.

Does anyone know what these are and where I can see an example of their usage ?


A simple test may help to understand :

try
set bb to 3 * "ccc"
on error errMsg number ErrNbr partial result partialResult from from_ to to_
log errMsg (*Impossible de convertir "ccc" en type number.*)
log ErrNbr (*-1700*)
log partialResult (**)
log from_ (*ccc*)
log to_ (*number*)
end try


Yvan KOENIG (VALLAURIS, France) vendredi 13 mars 2015 15:26:10



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >What Does Error Return ? (From: Luther Fuller <email@hidden>)

  • Prev by Date: integrating AppleScript and ScriptUI in Adobe Illustrator/InDesign?
  • Next by Date: Re: What Does Error Return ?
  • Previous by thread: Re: What Does Error Return ?---err
  • Next by thread: Re: What Does Error Return ?
  • Index(es):
    • Date
    • Thread