diff options
author | Sean Griffin <sean@thoughtbot.com> | 2014-06-24 09:09:14 -0600 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2014-06-24 09:09:14 -0600 |
commit | a1bd00d5be4f5bef34a259a053a00edede2cd2b5 (patch) | |
tree | f40b58eab25fed22255bd6a29f066900339fd857 /guides | |
parent | 174d73a4401b4d310fe8ee54994a04890a6bd6b9 (diff) | |
parent | 3fab50a9d7a77719f5d1bd12f1996261c6ba14b1 (diff) | |
download | rails-a1bd00d5be4f5bef34a259a053a00edede2cd2b5.tar.gz rails-a1bd00d5be4f5bef34a259a053a00edede2cd2b5.tar.bz2 rails-a1bd00d5be4f5bef34a259a053a00edede2cd2b5.zip |
Merge pull request #15828 from yuki24/add-warning-about-rescue-from-exception
Add warning section for `rescue_from Exception` in Guides
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/action_controller_overview.md | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/guides/source/action_controller_overview.md b/guides/source/action_controller_overview.md index 57097ab146..4c04a06dbb 100644 --- a/guides/source/action_controller_overview.md +++ b/guides/source/action_controller_overview.md @@ -1164,6 +1164,8 @@ class ClientsController < ApplicationController end ``` +WARNING: You shouldn't do `rescue_from Exception` or `rescue_from StandardError` unless you have a particular reason as it will cause serious side-effects (e.g. you won't be able to see exception details and tracebacks during development). If you would like to dynamically generate error pages, see [Custom errors page](#custom-errors-page). + NOTE: Certain exceptions are only rescuable from the `ApplicationController` class, as they are raised before the controller gets initialized and the action gets executed. See Pratik Naik's [article](http://m.onkey.org/2008/7/20/rescue-from-dispatching) on the subject for more information. |