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

Parser raises ValueError instead of ParseError for empty strings #849

Open
2 tasks done
MSDehghan opened this issue Oct 12, 2024 · 0 comments
Open
2 tasks done

Parser raises ValueError instead of ParseError for empty strings #849

MSDehghan opened this issue Oct 12, 2024 · 0 comments

Comments

@MSDehghan
Copy link

  • I am on the latest Pendulum version.

  • I have searched the issues of this repo and believe that this is not a duplicate.

  • OS version and name: Ubuntu 24.04

  • Pendulum version: 3.0.0

Issue

Current Behavior:
pendulum.parse("") raises ValueError: year 0 is out of range. Apparently it should raise ParseError just like the case of passing a single-space string(pendulum.parse(" ")) which raises ParserError: Unable to parse string [ ] .

Expected Behavior:
It should raise ParserError: Unable to parse string [].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant