diff options
| author | jim price <shadeops@gmail.com> | 2023-03-05 16:39:56 -0800 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-03-06 15:59:18 -0500 |
| commit | 6ab04b59417eb9c7fff81ea26424c2340dc72097 (patch) | |
| tree | 95a929045abb767ad47351af05778fb1ff0a6d32 /src/main.zig | |
| parent | 27701596060c7a8018f9a9add21952a6d7f83d96 (diff) | |
| download | zig-6ab04b59417eb9c7fff81ea26424c2340dc72097.tar.gz zig-6ab04b59417eb9c7fff81ea26424c2340dc72097.zip | |
std.os: Allow write functions to return INVAL errors
In Linux when interacting with the virtual file system when writing
in invalid value to a file the OS will return errno 22 (INVAL).
Instead of triggering an unreachable, this change now returns a
newly introduced error.InvalidArgument.
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main.zig b/src/main.zig index fb02628c61..b134b7183e 100644 --- a/src/main.zig +++ b/src/main.zig @@ -4622,6 +4622,7 @@ const FmtError = error{ ConnectionResetByPeer, LockViolation, NetNameDeleted, + InvalidArgument, } || fs.File.OpenError; fn fmtPath(fmt: *Fmt, file_path: []const u8, check_mode: bool, dir: fs.Dir, sub_path: []const u8) FmtError!void { |
