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

Replace unimplemented macro with ErrorDetails variant #399

Merged
merged 1 commit into from
May 2, 2019

Conversation

charlespierce
Copy link
Contributor

Closes #359

Replace uses of the unimplemented! macro with returning an ErrorDetails::Unimplemented error. The macro causes a panic, which is a jarring experience for the user, compared with our usual well-formatted errors. Instead of panicking in most cases, we can instead return an error that displays the same message using our existing error reporting mechanisms.

There are two cases where unimplemented! is still being used: Inside of event.rs, where it is part of an operation that isn't Fallible (and also isn't currently used), and inside of windows.rs, where it is simply a placeholder for when we compile with universal-docs and won't ever actually be run.

@charlespierce charlespierce merged commit 9075765 into volta-cli:master May 2, 2019
@charlespierce charlespierce deleted the remove_unimplemented branch May 2, 2019 23:23
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.

Use a friendly error instead of unimplemented! macro
2 participants