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

Potential improvements and input preservation in parsing and formatting error messages #361

Closed
qwwdfsad opened this issue Mar 4, 2024 · 1 comment · Fixed by #360
Closed
Labels
formatters Related to parsing and formatting

Comments

@qwwdfsad
Copy link
Contributor

qwwdfsad commented Mar 4, 2024

I've set the experiment "I have a system with externally-supplied input that I'm parsing" in order to see how debuggable the end system is.

Here are a few potential improvements that can be made:

  1. Inconsistent hour and the AM/PM marker correctly shows an unexpected component, but it would be nice to see the full input to understand the source of the problem.

E.g. for Inconsistent hour and the AM/PM marker: hour is 23, but the AM/PM marker is AM 23 is nice, but for observability purposes, I would like to see the whole input.

  1. Position X: Expected One of probably should be Position 0: Expected one of

  2. The same as for 1 it goes for validation of components done in constructors: LocalDate, LocalDateTime, LocalTime, UtcOffset

@dkhalanskyjb
Copy link
Contributor

Added a commit addressing this to #360

dkhalanskyjb added a commit that referenced this issue Mar 18, 2024
Fixes #359
Fixes #361

Additionally, remove delayed initialization of parsing to ensure that creating ambigous formats fails and document the thrown exception.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
formatters Related to parsing and formatting
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants