opt(err): show renaming file error source#4414
Conversation
djc
left a comment
There was a problem hiding this comment.
Should the std::error::Error::source() method be implemented to yield the source error for this?
@djc Thanks for asking, but I'm not sure, actually. I noticed that |
According to the thiserror documentation, it states:
Is it still necessary to implement the std::error::Error::source() method? |
|
Sure, but your PR does not add any |
This PR didn't add So it should implemented |
Ahh, okay, thanks. |
7251ef7 to
4ce57fd
Compare
|
@Binlogo just squash your commits please -- the second commit really belongs with the first one. |
chore: fix ci windows build issue
4ce57fd to
bc90f80
Compare
|
@djc Squashed. Thanks for the review. |
Problem you are trying to solve
We occasionally encounter the following error:
This issue is difficult to reproduce, so it's important to add a source for reporting first.
Description
This pull request introduces a
RenamingFileerror with asourceto improve error handling for file renaming operations in theRustupErrorenum. It updates the codebase to use this new error type, enhancing the clarity and consistency of error reporting.