Skip to content

Commit cd4bc32

Browse files
MaxDesiatovaciidgh
authored andcommitted
Improve FileSystemError by adding associated path
I've recently stumbled upon this error when running `swift build`: ``` error: noEntry ``` This is the exact and only output of this `swift build` invocation. Unfortunately, I think it's impossible to diagnose without an attached debugger. It's also hard to pinpoint where exactly the error comes from in the source code, since `FileSystemError.noEntry` is thrown from multiple places. In my opinion, for an error value to be helpful it should have associated information attached to it. In this case, it would make sense for almost all cases of `FileSystemError` to have an associated `AbsolutePath` value. `FileSystemError` now also has to be explicitly declared `Equatable` to make the tests compile, but previously it was `Equatable` anyway, although implicitly by virtue of being an enum with no associated values.
1 parent 651152d commit cd4bc32

File tree

6 files changed

+205
-168
lines changed

6 files changed

+205
-168
lines changed

0 commit comments

Comments
 (0)