-
Notifications
You must be signed in to change notification settings - Fork 5
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
Added errorhandler to convert errors to exceptions #30
base: main
Are you sure you want to change the base?
Conversation
55925c1
to
d784633
Compare
LGTM! |
Are we running this one somewhere yet? |
No, we're not. Hmm. Anyways, that's not to say we shouldn't do it, but it'll need some attention probably to keep errors down a bit. |
Can you book some time for this? No rush, but it would be good to have it planned. |
Certainly.
Harmen Janssen
2017-05-24 13:53 GMT+02:00 David Spreekmeester <[email protected]>:
… Can you book some time for this? No rush, but it would be good to have it
planned.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#30 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAxBaKwzBX45AX8wZ7q9f_TGRKwC5qGtks5r9BpXgaJpZM4MOSRF>
.
|
4464f30
to
fbc8c11
Compare
This is a followup to the discussion in issue #27. All PHP errors that can be handled with `set_error_handler` are converted to `Garp_Exception_RuntimeException` instances of the correct severity. This makes sure not even a notice slips through.
fbc8c11
to
fcd1f81
Compare
I'm using this branch in Subsidieportaal. Let's see what happens. |
Sounds good!
David Spreekmeester
Tech Lead | Grrr <http://grrr.nl/>
…On 4 July 2017 at 10:31, Harmen Janssen ***@***.***> wrote:
I'm using this branch in Subsidieportaal. Let's see what happens.
If no notable errors happen in a month or so I'll merge this to master,
bumping a major version (I don't want this to automatically propagate to
every project).
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#30 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGEptbPQia1L-Db0iWksFaaScuOPcqBTks5sKfh8gaJpZM4MOSRF>
.
|
Hmm, conclusions so far: it's a bit annoying to face warnings like "open basedir restriction in effect", when just asking if Anyways. The current implementation has one fairly large disadvantage: because the exception comes from the error handler, they're sort of on a different track. Meaning, if I would wrap my entire app from start to finish in a I've taken it out of Subsidieportaal for now, because Zend's cache helper does the aforementioned |
I'm weeping with you and hope for improvement in the near future 🤓
David Spreekmeester
Tech Lead | Grrr <http://grrr.nl/>
…On 7 July 2017 at 22:20, Harmen Janssen ***@***.***> wrote:
Hmm, conclusions so far: it's a bit annoying to face warnings like *"open
basedir restriction in effect"*, when just asking if file_exists. They
could've just chosen to return FALSE, and surely everything would just
keep on working fine.
Anyways.
The current implementation has one fairly large disadvantage: because the
exception comes from the error handler, they're sort of on a different
track. Meaning, if I would wrap my entire app from start to finish in a try
{ ... } catch, I still would not be able to catch that exception.
Unfortunately, that means Sentry won't pick up on it. So it needs further
investigation. Maybe we could use set_exception_handler
<http://php.net/manual/en/function.set-exception-handler.php>?
I've taken it out of Subsidieportaal for now, because Zend's cache helper
does the aforementioned file_exists check. I don't know why yet, but
pages using that helper would just bork completely.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#30 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGEptedwQz0yjGWfR9xt1e5fIeAxhNMQks5sLpMKgaJpZM4MOSRF>
.
|
This is a followup to the discussion in issue #27.
All PHP errors that can be handled with
set_error_handler
areconverted to
Garp_Exception_RuntimeException
instances of the correctseverity.
This makes sure not even a notice slips through.