Re: OS-9 question on try with on error
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