Advertisement
Guest User

Untitled

a guest
Jul 30th, 2017
434
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. require 'exception_notifier'
  2.  
  3. class ExceptionNotifier
  4. alias_method :old_exception_notification, :exception_notification
  5. def exception_notification(exception, controller, request, data={})
  6. bot = Marshmallow.new(:domain => 'yourdomain', :ssl=>true)
  7. bot.login( :method => :login,
  8. :username => "notify@yourdomain.com",
  9. :password => "passw0rd",
  10. :ssl => true,
  11. :room => "12345"
  12. )
  13. bot.say("EXCEPTION: #{controller.class.to_s} #{request.params[:action]} : #{exception.to_s}")
  14. bot.paste(data.to_a.join("\n"))
  15. old_exception_notification(exception, controller, request, data)
  16. end
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement