File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 9
9
*/
10
10
11
11
public enum SystemError : Swift . Error {
12
- case chdir( Int32 )
12
+ case chdir( Int32 , String )
13
13
case close( Int32 )
14
14
case dirfd( Int32 , String )
15
15
case fgetc( Int32 )
@@ -45,8 +45,8 @@ extension SystemError: CustomStringConvertible {
45
45
}
46
46
47
47
switch self {
48
- case . chdir( let errno) :
49
- return " chdir error: \( strerror ( errno) ) "
48
+ case . chdir( let errno, let path ) :
49
+ return " chdir error: \( strerror ( errno) ) : \( path ) "
50
50
case . close( let errno) :
51
51
return " close error: \( strerror ( errno) ) "
52
52
case . dirfd( let errno, _) :
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public func chdir(_ path: String) throws {
22
22
}
23
23
24
24
guard libc. chdir ( path) == 0 else {
25
- throw SystemError . chdir ( errno)
25
+ throw SystemError . chdir ( errno, path )
26
26
}
27
27
}
28
28
You can’t perform that action at this time.
0 commit comments