Skip to content

Commit

Permalink
Emit underlying error code when pretty-printing I/O errors (#4121)
Browse files Browse the repository at this point in the history
  • Loading branch information
neonichu authored Feb 14, 2022
1 parent 422082c commit d407500
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sources/Workspace/Diagnostics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ extension FileSystemError: CustomStringConvertible {
switch self.kind {
case .invalidAccess:
return "invalid access"
case .ioError:
return "encountered I/O error"
case .ioError(let code):
return "encountered I/O error (code: \(code))"
case .isDirectory:
return "is a directory"
case .noEntry:
Expand All @@ -199,8 +199,8 @@ extension FileSystemError: CustomStringConvertible {
switch self.kind {
case .invalidAccess:
return "invalid access to \(path)"
case .ioError:
return "encountered an I/O error while reading \(path)"
case .ioError(let code):
return "encountered an I/O error (code: \(code)) while reading \(path)"
case .isDirectory:
return "\(path) is a directory"
case .noEntry:
Expand Down

0 comments on commit d407500

Please sign in to comment.