-
Notifications
You must be signed in to change notification settings - Fork 3k
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
set_exception_handler invokes the handler but still show the fatal error msg #3019
Comments
This behaviour can be disabled by |
@milo is correct
|
@paulbiss This is a workaround and no fix, isn't it? |
Should the trace always be suppressed when an exception handler is defined? |
@paulbiss Well it isn't an |
I dug into this today, we only check If you think we should choose a different default feel free to open another issue, but insofar as I can tell this is by design, the flag is there if you want parity with PHP5. |
@paulbiss: Maybe it should be off by default to match PHP? |
@Majkl578 we'd consider a pull request for it. You'll probably have to add ini settings for tests we have that assume it's on and we'll need to update our configs internally. |
…bleHipHopSyntax Summary: By turning these off by default, we should match Zend behavior better on fatals with custom error handlers. Few examples: ``` set_error_handler(function () { echo 'hello'; }); invalid(); ``` This should produce only a fatal error message without calling user handler. ``` set_error_handler(function () { echo 'hello'; }); echo $invalid; ``` This should call user handler without producing notice message. ``` set_exception_handler(function () { echo 'hello'; }); throw new Exception(); ``` This should call user handler without producing fatal error message. Relates to #3019 and #4055. Closes #4066 Reviewed By: @ptarjan Differential Revision: D1640294 Signature: t1:1640294:1414638838:69aa654fbc4b805b3f1731d786a4e0ad338d29aa
The following code should print
Only print this message: User message here.
But instead it produces
The text was updated successfully, but these errors were encountered: