Title: Consider using ObjectDictionaryError iso. NotImplementedError in export/import OD APIs · Issue #475 · canopen-python/canopen · GitHub
Open Graph Title: Consider using ObjectDictionaryError iso. NotImplementedError in export/import OD APIs · Issue #475 · canopen-python/canopen
X Title: Consider using ObjectDictionaryError iso. NotImplementedError in export/import OD APIs · Issue #475 · canopen-python/canopen
Description: Discovered while reviewing #469. (See #469 (comment).) In most cases, ObjectDictionaryError is used for the export_od and import_od APIs, but for unsupported file formats, a NotImplementedError is raised. This is unconventional; NotImple...
Open Graph Description: Discovered while reviewing #469. (See #469 (comment).) In most cases, ObjectDictionaryError is used for the export_od and import_od APIs, but for unsupported file formats, a NotImplementedError is ...
X Description: Discovered while reviewing #469. (See #469 (comment).) In most cases, ObjectDictionaryError is used for the export_od and import_od APIs, but for unsupported file formats, a NotImplementedError is ...
Opengraph URL: https://github.com/canopen-python/canopen/issues/475
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Consider using ObjectDictionaryError iso. NotImplementedError in export/import OD APIs","articleBody":"Discovered while reviewing #469. (See https://github.com/christiansandberg/canopen/pull/469#discussion_r1661613953.)\r\n\r\nIn most cases, `ObjectDictionaryError` is used for the `export_od` and `import_od` APIs, but for unsupported file formats, a `NotImplementedError` is raised. This is unconventional; `NotImplementedError` is not a good fit for such an error case, as it was designed for other purposes (see the CPython docs).\r\n\r\nThe `NotImplementedError` in `export_od` is fairly new (introduced with #469), and has not been a part of a formal release; it can be changed without backwards compatibility concerns. The `raise` in `import_od` has been there longer, _but_ these are (for now) undocumented, though public, APIs. One can argue that since they are undocumented, it may be ok to change `import_od` as well.\r\n\r\nConsider switching to `ObjectDictionaryError`.","author":{"url":"https://github.com/erlend-aasland","@type":"Person","name":"erlend-aasland"},"datePublished":"2024-07-02T08:00:01.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":12},"url":"https://github.com/475/canopen/issues/475"}
| 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:2aa2df2a-d874-9148-de9d-e9301b1449d9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8424:17BD60:16117B4:1E46246:6A5F21D2 |
| html-safe-nonce | 66bcbb321e65b7b9a3cfd18d37edb3ea5f2ce5be24bea2e444b7f4d3b1405102 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NDI0OjE3QkQ2MDoxNjExN0I0OjFFNDYyNDY6NkE1RjIxRDIiLCJ2aXNpdG9yX2lkIjoiNTA2ODQzODU4NjUwMjYxOTYwMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 97cc8d67784480c328b26a25761d8b04c3304f5dc823ad2148cbf2c8f164c83b |
| hovercard-subject-tag | issue:2385529196 |
| 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/canopen-python/canopen/475/issue_layout |
| twitter:image | https://opengraph.githubassets.com/19fb74d40aee450f55229bd9300f0f62a4d97e1d047459ca8bcece192816cf50/canopen-python/canopen/issues/475 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/19fb74d40aee450f55229bd9300f0f62a4d97e1d047459ca8bcece192816cf50/canopen-python/canopen/issues/475 |
| og:image:alt | Discovered while reviewing #469. (See #469 (comment).) In most cases, ObjectDictionaryError is used for the export_od and import_od APIs, but for unsupported file formats, a NotImplementedError is ... |
| 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 | bf8fa4b42b6d150def6175efb9b0f1ec8e9628d7229ee2bdf6e850e7bdad923e |
| turbo-cache-control | no-preview |
| go-import | github.com/canopen-python/canopen git https://github.com/canopen-python/canopen.git |
| octolytics-dimension-user_id | 200581454 |
| octolytics-dimension-user_login | canopen-python |
| octolytics-dimension-repository_id | 68737600 |
| octolytics-dimension-repository_nwo | canopen-python/canopen |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 68737600 |
| octolytics-dimension-repository_network_root_nwo | canopen-python/canopen |
| 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 | 7debc3c6cd5de09c6e22b47a1b9982acb2aabb7b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width