Skip to content
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

database/sql: inconsistent error messages #25251

Closed
bontibon opened this issue May 4, 2018 · 3 comments
Closed

database/sql: inconsistent error messages #25251

bontibon opened this issue May 4, 2018 · 3 comments

Comments

@bontibon
Copy link
Contributor

@bontibon bontibon commented May 4, 2018

The database/sql package exports the errors:

var ErrConnDone = errors.New("database/sql: connection is already closed")
var ErrNoRows = errors.New("sql: no rows in result set")
var ErrTxDone = errors.New("sql: Transaction has already been committed or rolled back")
  1. ErrConnDone has "database/sql" as a prefix while the others simply have "sql".
  2. ErrTxDone uses an uppercase "T" in "Transaction", but shouldn't because Transaction is not a type.
@bontibon
Copy link
Contributor Author

@bontibon bontibon commented May 4, 2018

@ALTree ALTree added the NeedsDecision label May 4, 2018
@ALTree ALTree added this to the Go1.11 milestone May 4, 2018
@kardianos
Copy link
Contributor

@kardianos kardianos commented May 5, 2018

Technically we are in the freeze, but my other cls haven't been reviewed yet and this is tiny. I'll probably suggest a cl. I'll need to review issue more on desktop.

@gopherbot
Copy link

@gopherbot gopherbot commented May 5, 2018

Change https://golang.org/cl/111637 mentions this issue: database/sql: make error prefixes consistent

@gopherbot gopherbot closed this in 5cf3e34 May 5, 2018
@golang golang locked and limited conversation to collaborators May 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.