Skip to content

Proposal: Define Error Variables #31

@uji

Description

@uji

I’d like to allow library users to distinguish user caused errors and library or rpc caused errors.
This allows for better error handling by the user.

For example, in go-sql-driver/mysql, errors are defined by variables.
https://github.com/go-sql-driver/mysql/blob/ad9fa14acdcf7d0533e7fbe58728f3d216213ade/errors.go#L18-L31

In addition, complex ones are expressed by defining dedicated types.
https://github.com/go-sql-driver/mysql/blob/ad9fa14acdcf7d0533e7fbe58728f3d216213ade/errors.go#L57-L62

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions