-
Notifications
You must be signed in to change notification settings - Fork 111
Implemented a new constructor for Error: from_err() #126
Implemented a new constructor for Error: from_err() #126
Conversation
…s another error as the cause of Error
Seems good. Could you add tests? |
Yes, but I don't have time and energy to do it now. If you want to, go ahead. If you don't, I'll see what I can do in the following days. |
Ok, here's a test. |
Seems good. One cosmetic change though: what about |
Ah, indeed. Another thing: What do you think of taking |
That would be better. |
…to<ErrorKind> instead of ErrorKind.
All right, made the changes. |
Sorry, I forgot: could you also update the changelog and add an example in the doc? |
I'll do that tomorrow. |
Sorry for the delay. I'll do the things starting now. |
The other constructor on |
Yeah, seems good. |
Done! |
Thanks a lot! |
* Clarify usage for chaining and linking. * Add section on linked errors, and fix references. * Document with_chain as introduced by #126.
from_err() chains another error as the cause of Error.
Another thing to consider is that currently the
Error::from_kind()
andError::form_err()
constructors take the kind directly. Since this is a ergonomics-oriented library, it might be reasonable to takeInto<ErrorKind>
? What do you think? Or will it cause inference problems again?