[GH-ISSUE #1523] Add a Result type for richer error handling #801

Open
opened 2026-03-04 01:48:53 +03:00 by kerem · 0 comments
Owner

Originally created by @gaul on GitHub (Jan 17, 2021).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1523

In #1519 we discovered that some error values were not fully propagated. Even after the fix #1520, some functions like get_local_fent do not propagate the errno values from get_object_attribute. We could solve this by returning errno and using an out-param for the return value. But perhaps it would be better to introduce an absl::Status or Rust Result-style template that returns a Result<T, int>. This would enforce that the T is only accessed when the int errno is 0.

Originally created by @gaul on GitHub (Jan 17, 2021). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1523 In #1519 we discovered that some error values were not fully propagated. Even after the fix #1520, some functions like `get_local_fent` do not propagate the errno values from `get_object_attribute`. We could solve this by returning errno and using an out-param for the return value. But perhaps it would be better to introduce an `absl::Status` or Rust `Result`-style template that returns a `Result<T, int>`. This would enforce that the `T` is only accessed when the `int` errno is 0.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#801
No description provided.