Skip to content

Why is the error type opaque? #1577

Discussion options

You must be logged in to vote

The reason for an opaque error type is for forwards compatibility:

  • Exposing directly the wrapped errors in an enum would pin the dependencies to a certain version, preventing upgrading or even replacing them internally.
  • Restructuring the kind so as to give better context in a debug message is not possible if the internal enum is exposed.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Victor-N-Suadicani
Comment options

@seanmonstar
Comment options

Answer selected by Victor-N-Suadicani
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