Skip to content

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

Closed
chgnrdv wants to merge 2 commits into
python:mainfrom
chgnrdv:_ctypes_extend_error-print-exception-class-name
Closed

chgnrdv wants to merge 2 commits into
python:mainfrom
chgnrdv:_ctypes_extend_error-print-exception-class-name

Conversation

@chgnrdv

@chgnrdv chgnrdv commented May 4, 2022

Copy link
Copy Markdown
Contributor

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

ghost commented May 4, 2022

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-bot

Copy link
Copy Markdown

Every change to Python requires a NEWS entry.

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

@chgnrdv

chgnrdv commented Nov 6, 2022

Copy link
Copy Markdown
Contributor Author

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