Skip to content

gh-92119: Make _ctypes_extend_error print exception class name instead of exception class string repr #92314

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

Conversation

chgnrdv
Copy link
Contributor

@chgnrdv chgnrdv commented May 4, 2022

When making a call of C function with argument of wrong type (with function's argtypes attribute set) ctypes raises ArgumentError with error message containing exception class string representation (e. g. "<class 'TypeError'>"). This change makes it to use exception class qualified name instead, which is better matches the behavior described in ctypes documentation.

When making a call of C function with argument of wrong type (with function's argtypes attribute set)
ctypes raises ArgumentError with error message containing exception class string representation (e. g. "<class 'TypeError'>").
This change makes it to use exception class qualified name instead (which better matches the behavior described in ctypes documentation).
@ghost
Copy link

ghost commented May 4, 2022

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-bot
Copy link

Every change to Python requires a NEWS entry.

Please, add it using the blurb_it Web app or the blurb command-line tool.

@chgnrdv
Copy link
Contributor Author

chgnrdv commented Nov 6, 2022

Closing this in favor of #98302.

@chgnrdv chgnrdv closed this Nov 6, 2022
@chgnrdv chgnrdv deleted the _ctypes_extend_error-print-exception-class-name branch November 12, 2022 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants