-
Notifications
You must be signed in to change notification settings - Fork 197
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
Raise ValueError for unknown formats in the import/export OD APIs #476
Raise ValueError for unknown formats in the import/export OD APIs #476
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #476 +/- ##
==========================================
+ Coverage 67.55% 67.68% +0.12%
==========================================
Files 26 26
Lines 3101 3104 +3
Branches 521 521
==========================================
+ Hits 2095 2101 +6
+ Misses 864 862 -2
+ Partials 142 141 -1
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine overall. But I still favor ValueError
in these cases, as it is simply an invalid string being passed for the parameter. Such things should be sanitized / limited before calling the function IMHO. If it comes from a config file, ValueError
will be a correct description of th failure cause. In contrast, ObjectDictionaryError
concerns invalid operations using the OD, as its docstring states: """Unsupported operation with the current Object Dictionary."""
I'm fine with |
Thanks a lot for the review and the helpful discussion; highly appreciated. |
Fixes #475