Skip to content
This repository was archived by the owner on Feb 18, 2024. It is now read-only.

Log errors instead of failing in some cases#17

Open
maitredede wants to merge 1 commit into
gvalkov:masterfrom
maitredede:err-checks
Open

Log errors instead of failing in some cases#17
maitredede wants to merge 1 commit into
gvalkov:masterfrom
maitredede:err-checks

Conversation

@maitredede

Copy link
Copy Markdown

In some cases, a ioctl error should not block the full function since it is an normal behavior (for example, something not supported by the device).

@zonque

zonque commented Mar 30, 2020

Copy link
Copy Markdown

Libraries in packages such as this one should never log themselves, as that clashes with the logging in place of the application using them. If you want to augment the error to give more context (which totally makes sense), use fmt.Errorf() or wrap the error as described here

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants