Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

Howto Send Email When Rails Throws An Exception (See related posts)

Add the following to your application.rb:

  protected  

  def log_error(exception) 
    super(exception)

    begin
      ErrorMailer.deliver_snapshot(
        exception, 
        clean_backtrace(exception), 
        @session.instance_variable_get("@data"), 
        @params, 
        @request.env)
    rescue => e
      logger.error(e)
    end
  end


Taken from http://wiki.rubyonrails.com/rails/show/HowtoSendEmailWhenRailsThrowsAnException

You need to create an account or log in to post comments to this site.


Related Posts