-
Notifications
You must be signed in to change notification settings - Fork 7
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
Hooks on errors #3
Comments
Hmmm thats a good point. I can see that being useful to be able to get that information. So the question is how much context would we want around these errors? We could have a generic error callback for all errors that occur? Or we would want an error callback for connections, statements, transactions, queries, and execs all separately. |
I think we would want the highest resolution possible at the core. Other wrappers could aggregate or filter as desired. My initial thought was that each hook take an error argument, but the names don't sound quite right. For example when |
Sorry been really busy lately. Having more granularity at the core does seem like the way to go. I was considering having a separate I do like the suggestion of having it just be part of the various Any thoughts about having a second Also I'm wondering about if we want to do anything special to handle |
Another interface sounds reasonable. Rather than "optionally implemented," there would need to be another
I don't have any thoughts on this at the moment. |
I implemented my proposed change for this in #4 |
Is there a particular reason hooks are not called when the underlying driver returns an error?
I can't quite think of a use case for statistics, but I can imagine logging all database interactions.
The text was updated successfully, but these errors were encountered: