-
Notifications
You must be signed in to change notification settings - Fork 542
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
chrono Date<Utc>.format("%s") panics with unclear message #575
Comments
Can we just throw panic with clear error message instead of returning fmt::Error? Line 537 in 3467172
|
I think a good idea is to have |
I have run into this as well, can it be fixed in the next release? thx |
I wonder if my PR solves your problem? It's made a few months ago, so some conflicts have to be solved before it gets merged :(. |
Yes, it does, Thanks for your contribution |
Hi @hustcer - please see #614 (comment) for some alternative solutions available in the currently released version of |
We have multiple issues that track the issues out formatting code can panic. I'm closing this one since the |
panics with
panicked at 'a Display implementation returned an error unexpectedly: Error', /build/rustc-1.51.0-src/library/alloc/src/string.rs:2213:14
I feel like there should be a better panic for this case and I guess some other format values have similar panics. This is especially problematic since format doesn't return Result so I wouldn't expect this to panic nor can I handle it gracefully
The text was updated successfully, but these errors were encountered: