Replace unimplemented macro with ErrorDetails variant #399
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #359
Replace uses of the
unimplemented!
macro with returning anErrorDetails::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 ofevent.rs
, where it is part of an operation that isn'tFallible
(and also isn't currently used), and inside ofwindows.rs
, where it is simply a placeholder for when we compile withuniversal-docs
and won't ever actually be run.