Friday, August 17, 2012

Explicitly trigger an exception notification in Rails

Sometimes you may want to handle an exception nicely and at the same time receive exception notification email.  Here's the way:

begin
...
rescue Exception => e
  ExceptionNotifier::Notifier.background_exception_notification(e).deliver
end

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.