When building dynamic error pages, people (specially beginners) always
write rescue_from(Exception, ...) in ApplicationController. You can see it
(or something similar) is suggested on Stackoverflow
<http://stackoverflow.com/questions/5331008/dynamic-error-pages-in-rails-3>
and even RailsCasts
<http://railscasts.com/episodes/53-handling-exceptions-revised>. However,
doing so has serious side-effects such as listed below because it halts the
error chain:

  * No longer able to see nice exception details during development
  * gems like exception_notification and airbrake stops working

In addition, I've never seen any good use-cases of it in controllers. So I
think it only gives us serious issues.

And here's what I propose:

  * ActiveSupport::Rescuable remains the same
  * ActionController::Rescue overrides rescue_from and change it
to not accept Exception(raise some exception or output warning)

Since rescue_from is a class method, we can be notified when the app spins
up or re-loads everything during development, not run time. What do you
think?

Yuki Nishijima

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

Reply via email to