-
Notifications
You must be signed in to change notification settings - Fork 3k
Create DatasetNotFoundError and DataFilesNotFoundError #6431
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
Changes from 5 commits
4ed512a
f2b6c3a
2415efb
a70812b
cf4ba6f
6f3f3e3
bf8fa7a
87ad7c7
08ceb92
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,10 +5,23 @@ | |
| class DatasetsError(Exception): | ||
| """Base class for exceptions in this library.""" | ||
|
|
||
| pass | ||
|
|
||
|
|
||
| class DefunctDatasetError(DatasetsError): | ||
| """The dataset has been defunct.""" | ||
|
|
||
| pass | ||
|
|
||
| class FileNotFoundDatasetsError(DatasetsError, FileNotFoundError): | ||
| """FileNotFoundError raised by this library.""" | ||
|
|
||
|
|
||
| class DataFilesNotFoundError(FileNotFoundDatasetsError): | ||
| """No (supported) data files found.""" | ||
|
|
||
|
|
||
| class DatasetNotFoundError(FileNotFoundDatasetsError): | ||
| """Dataset not found. | ||
| Raised when trying to access: | ||
| - a missing dataset, or | ||
| - a private/gated dataset and the user is not authenticated. | ||
| """ | ||
|
Comment on lines
+21
to
+27
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we could re-use For example,
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree we could sub-class But anyway, we are just replacing the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would propose to address in a subsequent PR to catch specific |
||
Uh oh!
There was an error while loading. Please reload this page.