10000 Add Error struct type and tests, enabling easier error return checking by mdlayher · Pull Request #10 · mistifyio/go-zfs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add Error struct type and tests, enabling easier error return checking #10

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

Merged
merged 1 commit into from
Nov 12, 2014
Merged

Add Error struct type and tests, enabling easier error return checking #10

merged 1 commit into from
Nov 12, 2014

Conversation

mdlayher
Copy link
Contributor

Closes #9.

In the future, additional error checking helpers could be added using this struct, such as something like:

func IsZpoolExists(err error) bool

Which could easily indicate an error returned on zpool creation failure, due to a zpool already existing with the same name.

bakins added a commit that referenced this pull request Nov 12, 2014
Add Error struct type and tests, enabling easier error return checking
@bakins bakins merged commit 49f1a6c into mistifyio:master Nov 12, 2014
@bakins
Copy link
Contributor
bakins commented Nov 12, 2014

Thanks!

@mdlayher mdlayher deleted the error_struct branch November 12, 2014 23:14
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.

Consider returning errors as a struct
2 participants
0