• 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: Throwing Errors in Functions?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Throwing Errors in Functions?


  • Subject: Re: Throwing Errors in Functions?
  • From: Alex Hall <email@hidden>
  • Date: Wed, 11 Mar 2015 00:27:59 -0400


On Mar 11, 2015, at 12:08 AM, Shane Stanley <email@hidden> wrote:

On 11 Mar 2015, at 2:56 pm, Alex Hall <email@hidden> wrote:

throw msg "x cannot be less than 10." number -1

You're close:

   error "x cannot be less than 10." number -1

Well, that was easy. :) Thanks. On a related note, how would I force the script to stop executing if a function errors out? I've tried exit, but that's only for loops; and quit, but that somehow closed Script Editor.


--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>



--
Have a great day,
Alex Hall
email@hidden

 _______________________________________________
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

  • Follow-Ups:
    • Re: Throwing Errors in Functions?
      • From: "Stockly, Ed" <email@hidden>
    • Re: Throwing Errors in Functions?
      • From: Shane Stanley <email@hidden>
References: 
 >Throwing Errors in Functions? (From: Alex Hall <email@hidden>)
 >Re: Throwing Errors in Functions? (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Throwing Errors in Functions?
  • Next by Date: Re: Throwing Errors in Functions?
  • Previous by thread: Re: Throwing Errors in Functions?
  • Next by thread: Re: Throwing Errors in Functions?
  • Index(es):
    • Date
    • Thread