-
Notifications
You must be signed in to change notification settings - Fork 58
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
lmdbscan: Scanner.Scan panics if lmdbscan.New() failed. #21
Milestone
Comments
bmatsuo
added a commit
that referenced
this issue
Nov 2, 2015
Fixes #21 Method Scanner.Scan, checks the underlying cursor before calling Cursor.Get. This allows a Scanner.Err to catch an error opening the cursor even if called at the end of the transaction. If the Scanner.Scan method is called after the scanner has been closed then a Scanner.Err is set to return an error indicating that the scanner is closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If
lmdbscan.New()
fails then the error will be wiped out when the scanner's Scan method will panic attempting to access the underlying cursor. This is counter to the goals of the lmdbscan package, where ideally errors are checked for once at the end of the transaction.The text was updated successfully, but these errors were encountered: