Re: Throwing Errors in Functions?
Re: Throwing Errors in Functions?
- Subject: Re: Throwing Errors in Functions?
- From: "Stockly, Ed" <email@hidden>
- Date: Wed, 11 Mar 2015 17:20:51 +0000
- Thread-topic: Throwing Errors in Functions?
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.
You can use the return command to exit out of a handler, or your script if it's in the run or open hander.
Try
Set x to cat
On error
Return
End
|
_______________________________________________
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