• 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: OS-9 question on try with on error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OS-9 question on try with on error


  • Subject: Re: OS-9 question on try with on error
  • From: Luther Fuller <email@hidden>
  • Date: Mon, 07 Jun 2010 18:30:11 -0500

On Jun 7, 2010, at 5:24 PM, Doug McNutt wrote:

> While playing around with Excel, on this OS 9 I 8500, I came across some older code that I thought I could simplify.  It's also perhaps germane to a previous posting by L R K Perera.
>
> What I want is a try - end try block that includes an on error section that will simply quit running the rest of the script in the event of an error. The old code looks like this: (Yes it's an Applescript if you look closely. MPW is one of the best things Apple ever did.)

This will simply stop in case 'do stuff' errors

	try
		-- do stuff
	on error
		error number -128
	end try

If you want to exit a handler, replace the 'error ...' with 'return'.

 _______________________________________________
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: OS-9 question on try with on error
      • From: Doug McNutt <email@hidden>
References: 
 >OS-9 question on try with on error (From: Doug McNutt <email@hidden>)

  • Prev by Date: code runs in script editor, hangs as an FBA
  • Next by Date: Relocating Automator File to Different Folder
  • Previous by thread: OS-9 question on try with on error
  • Next by thread: Re: OS-9 question on try with on error
  • Index(es):
    • Date
    • Thread