Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
sending errors to Exceptional with rescue_from
class ExampleController < ApplicationController
rescue_from Exception, :with => :render_custom
def render_custom(exception)
if Exceptional::Remote.error(Exceptional::ExceptionData.new(exception, "Test Exception"))
Rails.logger.info "Exceptional: #{exception.class} has been reported to Exceptional"
else
Rails.logger.error "Exceptional: Problem sending exception. Check your API key."
end
render :text => "A custom error page"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.