Skip to content

Commit

Permalink
Merge pull request backup#189 from josephcrim/develop
Browse files Browse the repository at this point in the history
Send exit code 1 to shell after an exception has been thrown
  • Loading branch information
Michael van Rooijen committed Oct 8, 2011
2 parents 3a60b2c + a213e34 commit 271efe7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/backup/model.rb
Expand Up @@ -266,6 +266,8 @@ def show_exception!(exception)
Logger.normal "=" * 75 + "\nException that got raised:\n#{exception.class} - #{exception} \n" + "=" * 75 + "\n" + exception.backtrace.join("\n")
Logger.normal "=" * 75 + "\n\nYou are running Backup version \"#{Backup::Version.current}\" and Ruby version \"#{RUBY_VERSION} (patchlevel #{RUBY_PATCHLEVEL})\" on platform \"#{RUBY_PLATFORM}\".\n"
Logger.normal "If you've setup a \"Notification\" in your configuration file, the above error will have been sent."
#Notifies the shell an exception occured.
exit 1
end

end
Expand Down

0 comments on commit 271efe7

Please sign in to comment.