Title: Incorrect error handling for APIs that can raise exceptions · Issue #105375 · python/cpython · GitHub
Open Graph Title: Incorrect error handling for APIs that can raise exceptions · Issue #105375 · python/cpython
X Title: Incorrect error handling for APIs that can raise exceptions · Issue #105375 · python/cpython
Description: For example, in the collation callback two str objects (string1 and string2) are created using PyUnicode_FromStringAndSize. Error handling should happen directly after each call to PyUnicode_FromStringAndSize: cpython/Modules/_sqlite/con...
Open Graph Description: For example, in the collation callback two str objects (string1 and string2) are created using PyUnicode_FromStringAndSize. Error handling should happen directly after each call to PyUnicode_FromSt...
X Description: For example, in the collation callback two str objects (string1 and string2) are created using PyUnicode_FromStringAndSize. Error handling should happen directly after each call to PyUnicode_FromSt...
Opengraph URL: https://github.com/python/cpython/issues/105375
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Incorrect error handling for APIs that can raise exceptions","articleBody":"For example, in the collation callback two `str` objects (`string1` and `string2`) are created using `PyUnicode_FromStringAndSize`. Error handling should happen directly after each call to `PyUnicode_FromStringAndSize`:\r\n\r\nhttps://github.com/python/cpython/blob/0cb6b9b0db5df6b3f902e86eb3d4a1e504afb851/Modules/_sqlite/connection.c#L1870-L1875\r\n\r\nOther cases where error handling is not done immediately after the API has been used:\r\n\r\n- [x] gh-105491\r\n- [x] gh-105494\r\n- [x] gh-105585\r\n- [x] gh-105590\r\n- [x] gh-105591\r\n- [x] gh-105592\r\n- [x] gh-105593\r\n- [x] gh-105594\r\n- [x] gh-105667\r\n- [x] gh-105475 \r\n- [x] gh-105599\r\n- [x] gh-105586\r\n- [x] gh-105604\r\n- [x] gh-105606\r\n- [x] gh-105605\r\n- [x] gh-105608\r\n- [x] gh-105610\r\n- [x] gh-105611\r\n\r\nI might have missed some; I did not do a complete audit yet.\r\n\r\n\u003c!-- gh-linked-prs --\u003e\r\n### Linked PRs\r\n* gh-105412\r\n* gh-105440\r\n* gh-105441\r\n* gh-105475\r\n* gh-105491\r\n* gh-105494\r\n* gh-105581\r\n* gh-105582\r\n* gh-105583\r\n* gh-105584\r\n* gh-105585\r\n* gh-105586\r\n* gh-105590\r\n* gh-105591\r\n* gh-105592\r\n* gh-105593\r\n* gh-105594\r\n* gh-105596\r\n* gh-105597\r\n* gh-105598\r\n* gh-105599\r\n* gh-105600\r\n* gh-105601\r\n* gh-105604\r\n* gh-105605\r\n* gh-105608\r\n* gh-105610\r\n* gh-105611\r\n* gh-105612\r\n* gh-105613\r\n* gh-105615\r\n* gh-105642\r\n* gh-105643\r\n* gh-105644\r\n* gh-105645\r\n* gh-105646\r\n* gh-105647\r\n* gh-105648\r\n* gh-105649\r\n* gh-105650\r\n* gh-105651\r\n* gh-105659\r\n* gh-105660\r\n* gh-105661\r\n* gh-105662\r\n* gh-105663\r\n* gh-105664\r\n* gh-105665\r\n* gh-105666\r\n* gh-105667\r\n* gh-105668\n* gh-105669\n* gh-105686\n* gh-105710\n* gh-105711\n* gh-105720\n* gh-105721\n\u003c!-- /gh-linked-prs --\u003e\r\n","author":{"url":"https://github.com/erlend-aasland","@type":"Person","name":"erlend-aasland"},"datePublished":"2023-06-06T13:31:33.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/105375/cpython/issues/105375"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:800385fe-6c74-161f-33cb-be2b665bcc49 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9164:1B1D69:192AD33:22B04E8:696AA40D |
| html-safe-nonce | 814c94dbe238e558711309d7a9e35261d5aa349b68e410fdc9bc401212518361 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTY0OjFCMUQ2OToxOTJBRDMzOjIyQjA0RTg6Njk2QUE0MEQiLCJ2aXNpdG9yX2lkIjoiNTM1OTI0MjQ5NDE1NzE2OTY3NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 31bbe4642f7a9e2d82b8d933fa2d69f75a565c0938f5799c8e9ecc328b84dade |
| hovercard-subject-tag | issue:1743883856 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/105375/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e28d160c19cdd0f14bb74df40353a31239d9b4f6690cacd47fed369bbe642011/python/cpython/issues/105375 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e28d160c19cdd0f14bb74df40353a31239d9b4f6690cacd47fed369bbe642011/python/cpython/issues/105375 |
| og:image:alt | For example, in the collation callback two str objects (string1 and string2) are created using PyUnicode_FromStringAndSize. Error handling should happen directly after each call to PyUnicode_FromSt... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | erlend-aasland |
| hostname | github.com |
| expected-hostname | github.com |
| None | a51f97dbb9326f71c08ecb61577457d543c602124d1a2672871258ef37ac5261 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4bd0eac606c70914085176ef312ebdcd97a8cdf1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width