Created
August 22, 2011 13:51
-
-
Save shedd/1162412 to your computer and use it in GitHub Desktop.
Wrap Rake Tasks in Hoptoad Notifier
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Log any errors to Hoptoad as needed | |
# ** define this before the lib/tasks are included | |
def task_with_hoptoad_notification(options) | |
task(options) do | |
begin | |
yield | |
rescue Exception => msg | |
HoptoadNotifier.notify(msg) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment