pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: https://github.com/python/cpython/issues/129502

tps://github.githubassets.com/assets/repository-6ec84ae2261fecf8.css" /> Handling errors in ctypes callbacks · Issue #129502 · python/cpython · GitHub
Skip to content

Handling errors in ctypes callbacks #129502

@serhiy-storchaka

Description

@serhiy-storchaka

If an error happens in the callback or in converting result of the callback, it is handled by calling PyErr_FormatUnraisable(). If an error happens in preparing arguments for the callback, it is handled in different way -- some message is printed to stderr and then PyErr_Print() is called. In one case the error is not properly handled.

It is better to handle all errors in the uniform way. PyErr_Print() is not suitable for it because it treats SystemExit specially and has a side effect of setting sys.last_exc` and other variables.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





      Check this box to remove all script contents from the fetched content.



      Check this box to remove all images from the fetched content.


      Check this box to remove all CSS styles from the fetched content.


      Check this box to keep images inefficiently compressed and original size.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy