some of the exception are not too much intresting like typical ActiveRecord::RecordNotFound exceptions, To ignore these kind of trivial exceptions you must overide it in rescue_action_in_public method of your application.rb file.
Here is how you do it:
def rescue_action_in_public(exception)
case exception
when ::ActiveRecord::RecordNotFound,
::ActionController::UnknownController,
::ActionController::UnknownAction,
::ActionController::RoutingError
render_404
else
render_500
deliverer = self.class.exception_data
data = case deliverer
when nil then {}
when Symbol then send(deliverer)
when Proc then deliverer.call(self)
end
ExceptionNotifier.deliver_exception_notification(exception, self, request, data)
end
end
No comments:
Post a Comment