-
Notifications
You must be signed in to change notification settings - Fork 357
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
Revert "Do not override error handler" #271
Conversation
@Maks3w should I bump to 2.0.4 or is that something else that is wrong to you? |
IIRC semver said in this case a major version should be released. But knowing how Composer work it's better to be released as minor or patch. We could consider this like a bug instead of HTTP support drop so release as 2.0.4 |
Can anybody point me to the place where |
Also would you mind to use my original proposal to use error control operator |
I didn't find any errors mentioning for curl-exec. So I'm not sure what your question is. Also I believe |
@dmitry-varennikov-eventbase Error supression with public $errorHandlersCallables = ['start' => callable, 'end' => callable]
$this->errorHandlersCallables['start']()
....
$this->errorHandlersCallables['end']() |
@Maks3w don't you think it requires too much code for every caller to retrieve a JSON schema file? |
custom error handlers are optional. By default current behavior (set_error_handler) is used. IMO let this as is and come back when you have an specific real case. |
@Maks3w
Is it the only argument NOT to use my suggestion? |
May this could work. $error = false;
set_error_handler(function ($a, $b, ...) use (&$error) { $error = [$a, $b, ...];}
file_get_contents
restore_error_handler
if ($error) {throw Exception($error['a'], $error['b'])} |
Yeah as long as an exception is thrown outside of the re-defined error handler I'm happy with it |
Reverts #262