Skip to content

Commit d59c9e0

Browse files
authored
Improve FileSystemError by adding associated path (#167)
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 9604d2a commit d59c9e0

File tree

6 files changed

+209
-172
lines changed

6 files changed

+209
-172
lines changed

0 commit comments

Comments
 (0)