Skip to content

What's the library's policy on error wrapping vs vanishing? #1692

Answered by ti-mo
Blokyk asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Blokyk, thanks for the question. Sometimes, this is done on purpose to avoid callers depending on specific sentinels, but it could be that the cases you've spotted were simply mistakes.

We tend to call out specific error returns in the godoc string (e.g. this returns [ErrNotSupported] if ...), as well as having specific tests for them, since they're basically part of the API contract. Please file an issue and/or a PR if you'd like to make some changes.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Blokyk
Comment options

@Blokyk
Comment options

@ti-mo
Comment options

@Blokyk
Comment options

Answer selected by ti-mo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants