Created
February 27, 2009 20:16
-
-
Save jc00ke/71671 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| %w[rubygems exceptional].each { |lib| require lib } | |
| Exceptional.api_key = 'my_api_key' | |
| module Exceptional | |
| def self.handle_rake(exception) | |
| e = Exceptional.parse(exception) | |
| e.framework = "rake" | |
| e.occurred_at = Time.now.strftime("%Y%m%d %H:%M:%S %Z") | |
| Exceptional.post e | |
| end | |
| end | |
| begin | |
| 1/0 | |
| rescue Exception => e | |
| Exceptional.handle_rake(e) | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment