-
Notifications
You must be signed in to change notification settings - Fork 18k
database/sql: wrap errors with %w in driverArgsConnLocked #64728
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
This PR (HEAD: 3f21a21) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/550116. Important tips:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥳
Message from qiulaidongfeng: Patch Set 1: Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/550116. |
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/550116. |
Message from Gopher Robot: Patch Set 1: TryBot-Result+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/550116. |
Message from Aimuz me: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/550116. |
Message from Jes Cok: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/550116. |
Message from Mauri de Souza Meneguzzo: Patch Set 1: Code-Review+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/550116. |
Message from Ian Lance Taylor: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/550116. |
Message from Zhen Li: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/550116. |
Message from Ian Lance Taylor: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/550116. |
This PR (HEAD: c496858) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/550116. Important tips:
|
Message from Zhen Li: Patch Set 1: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/550116. |
Message from Ian Lance Taylor: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/550116. |
Use fmt.Errorf's %w verb to wrap errors in driverArgsConnLocked, which allows for easier unwrapping and checking of error types. Add tests in sql_test.go to ensure that Stmt.Exec and Stmt.Query correctly wrap underlying Valuer errors, adhering to the new change. Fixes golang#64707.
This PR (HEAD: 0df367e) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/550116. Important tips:
|
Message from Zhen Li: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/550116. |
Message from Ian Lance Taylor: Patch Set 3: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/550116. |
Message from Go LUCI: Patch Set 3: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-02-21T03:57:34Z","revision":"4c0c36e12ae2ddaf7700619c887a3c30f1b711a0"} Please don’t reply on this GitHub thread. Visit golang.org/cl/550116. |
Message from Ian Lance Taylor: Patch Set 3: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/550116. |
Message from Go LUCI: Patch Set 3: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/550116. |
Message from Go LUCI: Patch Set 3: LUCI-TryBot-Result+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/550116. |
Message from Ian Lance Taylor: Patch Set 3: Auto-Submit+1 Code-Review+2 Commit-Queue+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/550116. |
Message from Go LUCI: Patch Set 3: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2024-02-21T18:42:04Z","revision":"4c0c36e12ae2ddaf7700619c887a3c30f1b711a0"} Please don’t reply on this GitHub thread. Visit golang.org/cl/550116. |
Message from Ian Lance Taylor: Patch Set 3: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/550116. |
Message from Go LUCI: Patch Set 3: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/550116. |
Use fmt.Errorf %w verb to wrap errors in driverArgsConnLocked, which allows for easier unwrapping and checking of error types. Add tests in sql_test.go to ensure that Stmt.Exec and Stmt.Query correctly wrap underlying Valuer errors, adhering to the new change. Fixes #64707. Change-Id: Id9f80e265735d0849ee7abba63e58e4c26e658ad GitHub-Last-Rev: 0df367e GitHub-Pull-Request: #64728 Reviewed-on: https://go-review.googlesource.com/c/go/+/550116 Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Carlos Amedee <[email protected]> Reviewed-by: Mauri de Souza Meneguzzo <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
This PR is being closed because golang.org/cl/550116 has been merged. |
Use fmt.Errorf %w verb to wrap errors in driverArgsConnLocked,
which allows for easier unwrapping and checking of error types.
Add tests in sql_test.go to ensure that Stmt.Exec and Stmt.Query
correctly wrap underlying Valuer errors, adhering to the new change.
Fixes #64707.