-
Notifications
You must be signed in to change notification settings - Fork 2
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
Exception unsupported_runtime_value
could be more descriptive
#10
Comments
Short answer: I disagree because reasons, change my mind :) Long answer: I disagree, for the following reasons. First,
In other words: a There are several other exception types in the standard library which are not part of this hierarchy, for example
One could argue that But let's say we derive Now, you may have a situation in which the value passed to Edit: Having noted that, however, I do agree that makeshift could make it easier to generate user-facing error messages. Specifically, there could be a more generic string conversion function (perhaps called std::println(stderr,
"Error in parameter '{}': unsupported value '{}' (value needs to be one of {})",
paramName,
makeshift::to_string(value),
makeshift::to_string(makeshift::metadata::values<T>()); |
Yeah, the "situation in which the value passed to I thought the implementation were more straightforward when I wrote the issue and forked the repo to do it myself only to then realize that it isn't and I should wait for your response. |
Should I write a new issue for |
Thanks. We can use this issue to track the suggestion. |
unsupported_runtime_value
is only used byexpand
. For usability it would be nice if the exception would include the unsupported value itself and ideally also the list of supported values.The text was updated successfully, but these errors were encountered: