Skip to content

Instantly share code, notes, and snippets.

@jc00ke
Created February 27, 2009 20:16
Show Gist options
  • Select an option

  • Save jc00ke/71671 to your computer and use it in GitHub Desktop.

Select an option

Save jc00ke/71671 to your computer and use it in GitHub Desktop.
%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