提交 a1bd00d5 编写于 作者: S Sean Griffin

Merge pull request #15828 from yuki24/add-warning-about-rescue-from-exception

Add warning section for `rescue_from Exception` in Guides
......@@ -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.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册