Re: Enable to trap -39 error...
Re: Enable to trap -39 error...
- Subject: Re: Enable to trap -39 error...
- From: Axel Luttgens <email@hidden>
- Date: Wed, 20 Nov 2002 16:43:56 +0100
Monsoft wrote:
Hello,
I have some pbms to trap an error -39 (MacOS 9.2.2)
I have to copy regularly a file which is regularly updated by a
Windows application on a Windows disk.
This windows disk is mounted on my Mac (with DAVE) and all is working
fine except a randomly -39 error which is not trapped by this code :
tell application "Finder"
try
if busy status of (info for file Origine_Itineraire) is
false then
duplicate file Origine_Itineraire to folder myPath
with replacing
else
return false
end if
on error msg number errNum
return false
end try
end tell
My Apple Script application stopped with a Finder dialog each time
this error occured...
When I get info for this file, all seems to be OK.
When this error occured, my error trap doesn't trap anything!
First from an AppleScript perspective.
I guess the above code isn't complete.
So, the first question that appears is: are you sure the error occurs
from a statement within your try block?
(sorry to ask, but the obvious is sometimes so easily overlooked ;-) )
Should it be the case then, yes, seems to be a strange behavior.
Maybe are you making the error trapping more difficult for (your version
of?) AppleScript by telling the Finder to perform a standard addition
command?
Never noticed such a thing, but let's check ; could you try following
variant:
try
if busy status of (info for file Origine_Itineraire) is false then
tell application "Finder" to
duplicate file Origine_Itineraire to folder myPath
with replacing
else
return false
end if
on error msg number errNum
return false
end try
Second, you're speaking about a Finder dialog.
Do you mean that the dialog really doesn't seem to be originated by
AppleScript?
We should then have a look outside of it (this would also explain the
lack of error trapping...).
For example, can you raise the end-of-file error while performing your
script's actions manually, through the Finder's interface?
And anyway, does the dialog just say "error -39"? No more explanation?
HTH
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.