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

Rework encode()'s error handling #22

Merged
merged 1 commit into from
Dec 30, 2021
Merged

Rework encode()'s error handling #22

merged 1 commit into from
Dec 30, 2021

Commits on Dec 30, 2021

  1. Rework encode()'s error handling

    We no longer use a regular expression to validate the input string.
    Instead, the logic within the per-character encoding loop has been
    improved to catch all of the known error cases and raise appropriate
    ValueError exceptions.
    
    This results in slightly faster code with more useful errors. For
    example, we now include the actual character that we've identified as
    invalid, which aids in debugging.
    jparise committed Dec 30, 2021
    Configuration menu
    Copy the full SHA
    c944022 View commit details
    Browse the repository at this point in the history