• 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: Stopping a scipt in a Try Statment
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stopping a scipt in a Try Statment


  • Subject: Re: Stopping a scipt in a Try Statment
  • From: Greg Strange <email@hidden>
  • Date: Fri, 20 Apr 2001 08:30:42 -0500

> 'return'
>
> or
>
> 'error number -128'
>
> &, if it's an applet
>
> 'tell me to quit'

MMV on this one. Return doesn't seem to reliably exit a statement unless
it's inside a handler not necessarily inside just a try block. I personally
use error and then an actual error message. Just using error number -128
doesn't say anything to me nor does it to anyone running your script. So
usually do:

try
load script
on error
error "This script encountered an error: No script loaded."
tell me to quit
end try

Just my experience. YMMV.

Greg
--
...morning and evening we have them,
and they are the means by which we live.
Without them, we would not exist.
Without us they would have nothing to take ahold of.
It seems as if they have some True Master,
And yet I find no trace of him. He can act, yet I cannot see his form.
He has identity but no form.
---Chuang Tzu, Chapter 2


References: 
 >Re: Stopping a scipt in a Try Statment (From: JJ <email@hidden>)

  • Prev by Date: newbie to Quark Scripting
  • Next by Date: Re: problem running apple guidebook modules
  • Previous by thread: Re: Stopping a scipt in a Try Statment
  • Next by thread: Re: Stopping a scipt in a Try Statment
  • Index(es):
    • Date
    • Thread