Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
852b4fc2
Commit
852b4fc2
authored
Mar 22, 2018
by
Haralan Dobrev
Committed by
Fabien Potencier
Apr 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add note about ExceptionHandler in CLI
parent
bc50a7e6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
doc/cookbook/error_handler.rst
doc/cookbook/error_handler.rst
+12
-0
No files found.
doc/cookbook/error_handler.rst
View file @
852b4fc2
...
...
@@ -36,3 +36,15 @@ the ``$debug`` argument::
use Symfony\Component\Debug\ExceptionHandler;
ExceptionHandler::register(false);
.. note::
Important caveat when using Silex on a command-line interface:
The ``ExceptionHandler`` should not be enabled as it would convert an error
to HTML output and return a non-zero exit code::
use Symfony\Component\Debug\ExceptionHandler;
if (!in_array(PHP_SAPI, ['cli', 'phpdbg'])) {
ExceptionHandler::register();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment