-
Notifications
You must be signed in to change notification settings - Fork 550
Move error_number and sql_state into Mysql2::Error initializer #545
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
Conversation
Is there any situation when user should raise |
I don't think so. Edit: server_version is already an extra argument beyond StandardError. |
Current implementation differs from |
@seuros I don't think changing the initialize method is a problematic change, because the arguments are very new. That said, I further modified the PR to move Ideally, this is where we would use a separate exception class. For 0.4 perhaps. |
I'm still not getting the idea behind |
Sort of a thought experiment, since the extra args are only used by one caller in client.c, and don't really fit a getter/setter pattern because the args are only added at initialization.= |
I will have to check tomorrow my logs, I think it was some gem that raised this error when a deadlock is detected. We should also think about a major version bump, so we can remove all the legacy code. wdyt ? |
Yes, I'm planning for 0.4 "soon", after a 0.3.17 bugfix release. |
5a9d07b
to
576d6df
Compare
576d6df
to
66107d0
Compare
66107d0
to
98710ac
Compare
7a5065d
to
5a8bd66
Compare
I was also hoping this would fix #641 but it's still busted with:
|
5a8bd66
to
abd06c5
Compare
Move error_number and sql_state into Mysql2::Error initializer
An alternative to #544, make all of the needed parameters into the initialize method.