Skip to content
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

rustpkg should set the exit code properly, at least for some errors #9262

Closed
catamorphism opened this issue Sep 17, 2013 · 2 comments
Closed

Comments

@catamorphism
Copy link
Contributor

Unhandled conditions manifest as task failure (as discussed in #9001), and because of workcache, rustpkg does most of its work that can raise conditions in separate paths. Thus, the main function in rustpkg can't handle these conditions. However, in test cases we sometimes want to check that rustpkg failed with a certain unhandled condition. The solution I came up with is, inside rustpkg, to use task::try to wrap the main work, then check whether the result is Err(()) and set the exit code, then exit without failing, if so. This isn't a great solution since it uses the same exit code for all possible unhandled conditions (in one of the tests, I specifically want to check that the copy_failed condition was raised). But, I can't do any better right now because of the return type of task::try.

@catamorphism
Copy link
Contributor Author

It's possible to fix this now.

@thestinger
Copy link
Contributor

rustpkg is gone

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

No branches or pull requests

2 participants