go-sqlite3
go-sqlite3 copied to clipboard
always close db connection on error in Open
This commit fixes a bug where the db connection would not always be closed when an error occurred in Open. Additionally, it makes sure that we always unregister any callbacks associated with the connection, which previously did not always happen. This change consolidates the error handling logic (previously, it had to be done for each return statement) which should make it more difficult to introduce this type of bug in the future.
:warning: Please install the to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
Attention: Patch coverage is 14.28571% with 90 lines in your changes missing coverage. Please review.
Project coverage is 47.60%. Comparing base (
18cdded) to head (0ae71f8). Report is 5 commits behind head on master.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| sqlite3.go | 14.28% | 69 Missing and 21 partials :warning: |
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@ Coverage Diff @@
## master #1302 +/- ##
==========================================
+ Coverage 47.16% 47.60% +0.44%
==========================================
Files 12 12
Lines 1533 1523 -10
==========================================
+ Hits 723 725 +2
+ Misses 669 657 -12
Partials 141 141
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Please fix conflict
Conflict fixed and thank you for the quick review!