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

add DriverErr to retrieve the original database error #11

Merged
merged 1 commit into from
May 13, 2015

Conversation

mna
Copy link
Contributor

@mna mna commented May 13, 2015

Hi Russ,

I really like that package, I feel it's just the right (thin) set of features above Go's database package. The only thing I felt was missing was a way to retrieve the original driver's error, as it was hidden away by the fmt.Errorf calls. It can be important to determine what caused the error (e.g. duplicate row, constraint error, etc.). So I added an internal error type that wraps the original error and preserves the same error messages as before, but with a DriverErr function to be able to retrieve that original error.

There's also a test for that new feature.

Thanks,
Martin

russross added a commit that referenced this pull request May 13, 2015
add DriverErr to retrieve the original database error
@russross russross merged commit bbdc44f into russross:master May 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants