-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: Better wrap GDAL errors and pass through GDAL exceptions (#39)
- Loading branch information
1 parent
8136492
commit d0b202a
Showing
10 changed files
with
182 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Error handling | ||
|
||
Pyogrio tries to capture and wrap errors from GDAL/OGR where possible, but defers | ||
to error messages emitted by GDAL where available. The error types below are | ||
intended to help assist in determining the source of the error in case the | ||
error message is a bit cryptic. | ||
|
||
Some of the errors that may be emitted by pyogrio include: | ||
|
||
- `ValueError` / `TypeError`: indicates that a user-provided is invalid for a particular | ||
operation | ||
- `DataSourceError`: indicates an error opening or using a transaction against a data source | ||
- `DataLayerError`: indicates an error obtaining a data layer or its properties (subclassed by all of following) | ||
- `CRSError`: indicates an error reading or writing CRS information | ||
- `FeatureError`: indicates an error reading or writing a specific feature | ||
- `GeometryError`: indicates an error reading or writing a geometry field of a single feature | ||
- `FieldError`: indicates an error reading or writing a non-geometry field of a single feature | ||
|
||
All the pyogrio specific errors are subclasses of `RuntimeError`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,5 +40,6 @@ supported_formats | |
install | ||
introduction | ||
api | ||
errors | ||
known_issues | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.