Skip to content

Commit

Permalink
ENH: capture all errors logged by gdal when opening a file fails (#495)
Browse files Browse the repository at this point in the history
  • Loading branch information
theroggy authored Dec 6, 2024
1 parent 57d9346 commit ea3d23f
Show file tree
Hide file tree
Showing 9 changed files with 354 additions and 125 deletions.
8 changes: 6 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@

## 0.11.0 (TBD)

### Improvements

- Capture all errors logged by gdal when opening a file fails (#495).

### Bug fixes

- Fix WKB writing on big-endian systems (#497).

### Packaging

- the GDAL library included in the wheels is upgraded from 3.9.2 to 3.10.0 (#499).
- The GDAL library included in the wheels is upgraded from 3.9.2 to 3.10.0 (#499).

## 0.10.0 (2024-09-28)

Expand All @@ -20,7 +24,7 @@

- Silence warning from `write_dataframe` with `GeoSeries.notna()` (#435).
- Enable mask & bbox filter when geometry column not read (#431).
- Raise NotImplmentedError when user attempts to write to an open file handle (#442).
- Raise `NotImplementedError` when user attempts to write to an open file handle (#442).
- Prevent seek on read from compressed inputs (#443).

### Packaging
Expand Down
1 change: 1 addition & 0 deletions pyogrio/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
PANDAS_GE_20 = pandas is not None and Version(pandas.__version__) >= Version("2.0.0")
PANDAS_GE_22 = pandas is not None and Version(pandas.__version__) >= Version("2.2.0")

GDAL_GE_352 = __gdal_version__ >= (3, 5, 2)
GDAL_GE_38 = __gdal_version__ >= (3, 8, 0)

HAS_GDAL_GEOS = __gdal_geos_version__ is not None
Expand Down
13 changes: 9 additions & 4 deletions pyogrio/_err.pxd
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
cdef object exc_check()
cdef int exc_wrap_int(int retval) except -1
cdef int exc_wrap_ogrerr(int retval) except -1
cdef void *exc_wrap_pointer(void *ptr) except NULL
cdef object check_last_error()
cdef int check_int(int retval) except -1
cdef void *check_pointer(void *ptr) except NULL

cdef class ErrorHandler:
cdef object error_stack
cdef int check_int(self, int retval, bint squash_errors) except -1
cdef void *check_pointer(self, void *ptr, bint squash_errors) except NULL
cdef void _handle_error_stack(self, bint squash_errors)
Loading

0 comments on commit ea3d23f

Please sign in to comment.