• 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: Error handling?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Error handling?
      • From: Shane Stanley <email@hidden>
References: 
 >Error handling? (From: Dave C <email@hidden>)
 >Re: Error handling? (From: "S. J. Cunningham" <email@hidden>)
 >Re: Error handling? (From: Jörgen Stahle <email@hidden>)

  • Prev by Date: Re: Script Editor having problems saving files
  • Next by Date: Re: Error handling?
  • Previous by thread: Re: Error handling?
  • Next by thread: Re: Error handling?
  • Index(es):
    • Date
    • Thread