Your best friend for file transfer.

Fetch application logoFetch

trapping fetch errors (3 posts)

This is an archived topic. The information in it is likely to be out-of-date and no longer applicable to current versions of Fetch.
  • Started 13 years ago by rosmifetch
  • Latest reply 13 years ago from rosmifetch
  • rosmifetch Member

    Hi- I'm running an applescript here on a few G4-cubes and os 9.1 that ftp stuff from the cubes to our Unix based RIPs. If something bad happens to one of the Unix boxes, I'm having trouble trapping for Fetch 3.03's errors. What I want to happen is for fetch to tell applescript the error so I can add it to a log file and have everything continue on it's merry way. Instead, when an error occurs, the script gets and logs the error and Fetch throws up a dialog box, refusing to do anything else, and stops the script from continuing.... ideas? Here's my code snippet:

    try
    with timeout of 180 seconds
    tell application "Fetch 3.0.3" to put into url curdfurl item alias myitem binary format Raw Data
    end timeout
    tell application "Finder" to delete file myitem
    on error errMsg
    tell me to display dialog the errMsg buttons {"Continue"} default button 1 giving up after 3
    logfile({errMsg, "Destination: " & curdfurl, "Source: " & myitem})
    end try

    Posted 13 years ago #

  • Jim Matthews Administrator

    Fetch shouldn't put up an error dialog if its responding to an AppleScript. Can you describe the error that your script receives, and the error dialog that Fetch puts up?

    Thanks,

    Jim Matthews
    Fetch Softworks

    Posted 13 years ago #

  • rosmifetch Member

    never mind, it was a goof on my part.
    I tried trapping for errors by doing
    try
    tell "fetch"
    do stuff
    end tell
    end try

    If I change my code to
    tell "fetch"
    try
    do stuff
    end try
    end tell
    fetch reports the errors to applescript.

    Posted 13 years ago #

Topic closed

This topic has been closed.