Skip to content

ActionDispatch::DebugExceptions should allow to skip logging known exceptions #9343

@vimutter

Description

@vimutter

For instance, when user specifies rescue_responses, he might want to skip flushing those exceptions backtrace into log.

Currently both show_exceptions.rb and debug_exceptions.rb share the same option. Thus if we want show_exceptions = true, we get log for all exceptions, even for DocumentNotFound. For some cases 404 in that case is not critical situation and thus backtrace about cause of error is not required. If we set show_exceptions = false we will pass this exception to upper level, i.e. ShowException will skip handling them with rescue_responses.

I propose either to provide some options to specify which exceptions should be silenced (completely), or add some logic to deal with registered exceptions in rescue_responses.

Rails 3.2.12, Ruby 1.9.3

https://github.com/rails/rails/blob/3-2-stable/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions