-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-error-handlingArea: Error handlingArea: Error handlingC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.PG-error-handlingProject group: Error handling (https://github.com/rust-lang/project-error-handling)Project group: Error handling (https://github.com/rust-lang/project-error-handling)T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
It would be useful if std::process::ExitStatus
implemented std::ops::Try
. This could reduce boilerplate code where multiple Command
s need to be spawned and checked.
Open question: What's a good error type? ExitStatus
itself already contains all the relevant error information from the command, but being able to return a result of Err(ExitStatus::from_code(0))
would be weird. (Thanks @scottmcm for pointing this out.)
Metadata
Metadata
Assignees
Labels
A-error-handlingArea: Error handlingArea: Error handlingC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.PG-error-handlingProject group: Error handling (https://github.com/rust-lang/project-error-handling)Project group: Error handling (https://github.com/rust-lang/project-error-handling)T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.