Capturing Errors!
Capturing Errors!
- Subject: Capturing Errors!
- From: Paul <email@hidden>
- Date: Fri, 15 Dec 2000 11:07:55 +0000
Can anyone help?
I am having trouble capturing errors. If any error occurs whilst trying to
connect to the remote machine, I want the process to stop. If a file is not
loaded properly I want the file label set to 2.
Any ideas would be much appreciated. I have included the script in its
current state.
Thanks in advance.
Paul
set this_URL to "
ftp://195.224.231.179"
tell application "Finder"
set fileList to every file of folder "AFTPFolder" whose label index is
not 1
end tell
try
with timeout of 10 seconds
tell application "URL Access Scripting"
repeat with x in fileList
set theFile to x as alias
upload theFile to this_URL with progress
tell application "Finder" to set the label index of theFile
to 1
end repeat
quit
end tell
end timeout
on error the error_message number error_number
tell application "URL Access Scripting" to quit
if the error_number is not -128 then
-- display dialog the error_message buttons {"Cancel"} default button
1
end if
end try