Running second script when first script fails?

I have a Hazel rule that runs an AppleScript script. The script uses theFile variable but doesn't return anything. Sometimes, the AppleScript will fail when the app it references is unresponsive. Is it possible for me to then run a shell script if the AppleScript fails? Thanks!