File: errors.md

package info (click to toggle)
pyogrio 0.12.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,664 kB
  • sloc: python: 7,307; ansic: 47; makefile: 42
file content (19 lines) | stat: -rw-r--r-- 1,067 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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`.