Skip to content
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

[error] Allow find cause and inspect error without checking key words in error message #66

Closed
at15 opened this issue Apr 12, 2018 · 5 comments

Comments

@at15
Copy link
Member

at15 commented Apr 12, 2018

Currently, error handling is still not very handy, still need to

  • get root cause/cause of certain error, we already has wrap (but we have multi error)
  • allow library user to inspect the error without calling strings.Contains(err.Error(), "not exists")
  • categorize error so they can be reported to a central service (like sentry)
  • convert error from standard library and pkg/errors
  • document and example
    • auto update godoc.org after commit (it needs manual refresh ...)

Ref

Go

Rust

@at15
Copy link
Member Author

at15 commented Apr 12, 2018

@gaocegege @codeworm96 any recommendation for error handling in go/rust or any other languages ... @xplorld

@codeworm96
Copy link
Member

I think errors should be type rich.

@at15
Copy link
Member Author

at15 commented Apr 13, 2018

@codeworm96 you mean have an interface and inspect based on type?

@codeworm96
Copy link
Member

Different errors should be different types/variants of enum (at best effort, though)

@at15 at15 added this to the 0.0.8 milestone Aug 9, 2018
@at15
Copy link
Member Author

at15 commented Dec 31, 2018

Fixed in #96

@at15 at15 closed this as completed Dec 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants