Re: Error handling?
Re: Error handling?
- Subject: Re: Error handling?
- From: Dave C <email@hidden>
- Date: Sun, 08 Mar 2015 19:28:39 -0700
Script has evolved to this (see below).
To test error handling I start Time Machine backup and run this script to eject the TM volume “Moe”. The script displays the “Moe ejected. No errors” message. But then immediately following the system displays “Moe could not be ejected because it was in use. Force eject?” message.
Why did my script not get an error so I could process it?
Thanks, Dave an AS noob.
- - -
try tell application "Finder" eject "Moe" display dialog "Moe ejected. No Error " -- & errNmu & ": " & errMsg end tell on error errMsg number errNum if errNum = 0 then return else display dialog "Non-Straightforward Error " & errNum & ": " & errMsg end if end try
AppleScript Editor 2.6
OS X 10.9.1 Mavericks Mac mini (2011_5,3): 2.7 GHz Intel dual i7 / 16 GB / 250 GB & 750 GB
|
_______________________________________________
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