Skip to content

ensure callers of BuildDirectory::run can determine if the source of the error is in Prepare::prepare #103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Skgland
Copy link
Contributor

@Skgland Skgland commented Jul 22, 2025

Without this can be difficult to distinguish whether BuildDirectory::run failed due to f failing or due to Prepare::prepare failing.

Related to #98 as it helps with errors not easily sub-categorized to at least get them into the general category of prepare failures.

Skgland added a commit to Skgland/crater that referenced this pull request Jul 22, 2025
Skgland added a commit to Skgland/crater that referenced this pull request Jul 22, 2025
@Skgland Skgland marked this pull request as draft July 23, 2025 18:12
@Skgland
Copy link
Contributor Author

Skgland commented Jul 23, 2025

Making it a draft while I add tests (rebasing on top of the first two commit of #98)

Skgland added 4 commits July 23, 2025 21:05
if a more specifc one hasn't already been provided

this way we can easily distinguish BuildDirectory::run failing due to Prepare::prepare failing from it failing for other reasons
@Skgland Skgland force-pushed the ensure_prepare_error_context branch from 8bd1691 to f25d523 Compare July 23, 2025 21:42
@Skgland Skgland marked this pull request as ready for review July 23, 2025 21:47
Skgland added 2 commits July 25, 2025 22:50
to discourage explicitly matching this variant explicitly.
As the enum is non_exhaustive a wildcard pattern is required anyway.
to match std::io::ErrorKind::Uncategorized
@Skgland
Copy link
Contributor Author

Skgland commented Jul 25, 2025

Renamed the added PrepareError::Unknown variant to PrepareError::Uncategorized and marked it as #[doc(hidden)] so that it can act similar to std::io::ErrorKind::Uncategorized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant