Hi guys, I'm new to Applescript.

How I know when a volume is busy to eject?

I was trying with something like this

tell application "Finder"
try
eject "Disk"
on error
--code for busy volume

However when the drive is busy the "on error" block is still ignored

Any ideas please?