Shirt Pocket Discussions  
    Home netTunes launchTunes SuperDuper! Buy Now Support Discussions About Shirt Pocket    

Go Back   Shirt Pocket Discussions > SuperDuper! > General

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-10-2006, 05:09 PM
edoates edoates is offline
Registered User
 
Join Date: Jul 2005
Posts: 44
Scripts and error detection

I have the following lines in a SuperDuper backup scripts, but when I got an I/O error (a legitimate one, unfortunately), the "onError" condition was not activated. I use the script to automate nightly backups, and create a text file with either a "succeeded" or "failed" line, and use that to alert me to look at the log file. Since the "onError" was not activated, I didn't discover the error for a new days.

The script appears to "quit" normally.

Are all errors supposed to be caught by the "onError" condition? I'm runnint the latest version (2.1.1 V78).

The script segment:

tell application "SuperDuper!"
try
--Wait until SuperDuper! is idle before loading and running the desired session
repeat while status is not idle
--Sleep # seconds is the best way to "wait" without using the CPU
tell application "System Events" to do shell script "sleep 5"
end repeat
if status is idle then
--Specify the saved settings as either an absolute path or just the name
run using settings "Backup Eds Office" without user interaction
end if
--Wait until the session is done
repeat while status is running
--Sleep # seconds is the best way to "wait" without using the CPU
tell application "System Events" to do shell script "sleep 5"
end repeat
on error errMsg
display dialog errMsg & " See section 12 of the User's Guide for help with this script."
set message_text to "echo " & (return) & (current date) &
": Backup Eds Office ERROR." & (return) & " See SUPERDUPER LOG." & (return) & (return) &
" >>/users/edoates/desktop/backup_log.txt"
end try
--Once done, tell SuperDuper! to eject Eds Office Backup and quit
quit

Ed Oates
Reply With Quote
  #2  
Old 06-10-2006, 06:10 PM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,737
Send a message via AIM to dnanian
There are two types of error that SD! can generate. The first is a "preflight" error -- that is, before copying starts, during the load of the settings. If you get an error here, it enters the "on error" block.

The second is a post-copy error. To trap that, you must check the status after the run. If it's "done", there were no errors. Otherwise, an error occurred.
__________________
--Dave Nanian
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:45 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2021, vBulletin Solutions, Inc.