-
-
Notifications
You must be signed in to change notification settings - Fork 656
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
Use error-chain for Main Error Type #149
Comments
One of the main concern is that understanding |
My general opinion is that the problems that error-chain solves are important, but that it's too much magic for my blood. Two things to note about myself:
|
I empathize with 1... Especially for a libraries. Library source code eventually tends to be more |
In addition to this I think we could add more logging to If Alternatively if out-of-the-box logging is going to have all this detail then we could rely on that and leave the errors mostly as they are. We could have a Thoughts? |
@KodrAus quick update... Let's give it one more week of thoughts. |
@KeenS corrected me. The errorkind not showing in the rustdoc was just a matter of it being publicly exposed. |
Ok, I'll get the |
Closed by #177. The main Error type is now using |
Can we make
tantivy
's error handling better usingerror-chain
?error-chain
gives us better backtraces thanks tobacktrace
, which would be great giventantivy
is complex and asynchronous, but it imposes a particular open-book structure on your error type.Currently we've got small, specialised error types in submodules that are collected into this main user-facing
Error
. The idea is to useerror-chain
for the main user-facingtantivy::Error
type and keep the specialised errors as just plainstd::Error
s. I guess we'dchain_err
those?Does anyone have any other thoughts/recommendations/considerations on how we could hold
error-chain
or something else to keeptantivy
s error handling idiomatic and useful? Any input would be really appreciated! I've got a quick spike here that could be a good starting point for discussion.cc: @fulmicoton @brson @BurntSushi
The text was updated successfully, but these errors were encountered: