Skip to content

Recommend registering the error handler in prod #10668

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions components/debug.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ tools.

.. caution::

You should never enable the debug tools in a production environment as
they might disclose sensitive information to the user.
Apart from the error handler, you should never enable the debug
tools in a production environment as they might disclose sensitive
information to the user.

Enabling the Error Handler
--------------------------
Expand All @@ -56,6 +57,12 @@ fatal errors)::

ErrorHandler::register();

.. note::

This one is fine to use in a production environment and will be
Copy link
Contributor

@ro0NL ro0NL Nov 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure we should advise ppl to register as above in prod, FWBundle explicitly does ErrorHandler::register(null, false)->throwAt(-1, true);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first argument is null by default, as for the second, it tells the error handler to replace the previous one, which people probably want to do if they decide to use ours, right?

enabled if you use the framework bundle, so that you get better
logging.

Enabling the Exception Handler
------------------------------

Expand Down