Skip to content

Commit

Permalink
code review - revert explicit error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
maciekbartczak committed Jan 1, 2025
1 parent 4ccd564 commit 9ce4e36
Showing 1 changed file with 2 additions and 27 deletions.
29 changes: 2 additions & 27 deletions src/apprt/gtk/App.zig
Original file line number Diff line number Diff line change
Expand Up @@ -908,33 +908,8 @@ fn syncConfigChanges(self: *App) !void {
.{},
),
};
self.loadCustomCss() catch |err| switch (err) {
error.OutOfMemory => log.warn(
"out of memory loading custom CSS, no custom CSS applied",
.{},
),
error.StreamTooLong => log.warn(
"failed to load custom CSS, no custom CSS applied - encountered stream too long error: {}",
.{err},
),
error.Unexpected => log.warn(
"failed to load custom CSS, no custom CSS applied - encountered unexpected error: {}",
.{err},
),
std.fs.File.Reader.Error.InputOutput,
std.fs.File.Reader.Error.SystemResources,
std.fs.File.Reader.Error.IsDir,
std.fs.File.Reader.Error.OperationAborted,
std.fs.File.Reader.Error.BrokenPipe,
std.fs.File.Reader.Error.ConnectionResetByPeer,
std.fs.File.Reader.Error.ConnectionTimedOut,
std.fs.File.Reader.Error.NotOpenForReading,
std.fs.File.Reader.Error.SocketNotConnected,
std.fs.File.Reader.Error.WouldBlock,
std.fs.File.Reader.Error.AccessDenied => log.warn(
"failed to load custom CSS, no custom CSS applied - encountered error while reading file: {}",
.{err},
),
self.loadCustomCss() catch |err| {
log.warn("Failed to load custom CSS, no custom CSS applied, err={}", .{err});
};
}

Expand Down

0 comments on commit 9ce4e36

Please sign in to comment.