-
Notifications
You must be signed in to change notification settings - Fork 564
Poor error message when attempting to format NaiveDate
with unsupported specifiers
#1660
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
Comments
You might want to try |
Thank you. Would modifying the Although this error message gives us context that the format string is invalid, it would be great to specify which specifier is invalid, especially since I'd be happy to post a PR for this change. |
I think we can add variants to |
I'm wondering if we want to first update the Then the message in If capturing the specific unsupported specifier isn't needed, I could also refactor |
I don't think semver allows us to change existing variants, only add new variants. |
When attempting to format a
NaiveDate
with time-related/unsupported specifiers, the error message is not informative.For example:
Both outputs:
The error message could be improved indicating time specifiers or unsupported specifiers cannot be used with
NaiveDate
.The text was updated successfully, but these errors were encountered: