Skip to content
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

ENH: capture all errors logged by gdal when opening a file fails #495

Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
9d62c76
ENH: capture all errors logged by gdal when opening a file fails
theroggy Nov 10, 2024
d4f917c
Update CHANGES.md
theroggy Nov 10, 2024
3d70280
Apply feedback: use helper function to clean up error message
theroggy Nov 12, 2024
c079971
Extract clean_error_message in seperate function and use where possible
theroggy Nov 12, 2024
c04497b
Remove logging GDAL messages via python logging.log
theroggy Nov 12, 2024
a760ab6
Remove __stdcall on windows as it is not necessary
theroggy Nov 12, 2024
1c2ad34
Rename new error handling class, context manager
theroggy Nov 12, 2024
135fa80
Rename exc_wrap_* functions to check_*
theroggy Nov 12, 2024
ca42306
Remove unneeded import logging
theroggy Nov 12, 2024
ad91d2e
Remove unused GDALErrCtxManager
theroggy Nov 12, 2024
2a30dd1
Remove unused GDALError enum
theroggy Nov 13, 2024
abe8577
Remove obsolete import
theroggy Nov 13, 2024
160ddc9
Use nogil when no error is logged in stacking_error_handler
theroggy Nov 13, 2024
5203244
Feedback: use CPLPushErrorHandler istead of Ex variant
theroggy Nov 14, 2024
f76fc56
Move exception squashing to _err.pyx
theroggy Nov 14, 2024
26fefec
Remove global _ERROR_STACK declarations
theroggy Nov 14, 2024
0b85d34
Fix tests again
theroggy Nov 14, 2024
723ce9a
Remove check_ogrerr and use OGRERR_NONE where applicable
theroggy Nov 14, 2024
8562c9f
Remove get_last_error_msg again as it is only used in one location an…
theroggy Nov 14, 2024
68f7908
Return "No error message." as error message if there is none + avoid …
theroggy Nov 14, 2024
ea4f676
Merge remote-tracking branch 'upstream/main' into ENH-capture-all-err…
theroggy Nov 14, 2024
ad742bc
Remove include of CPLPushErrorHandlerEx
theroggy Nov 16, 2024
4a43684
Cast exception to string instead of using errmsg
theroggy Nov 17, 2024
34182f3
Merge remote-tracking branch 'upstream/main' into ENH-capture-all-err…
theroggy Dec 3, 2024
59d7315
Update _io.pyx
theroggy Dec 3, 2024
518204c
Try fixing tests for gdal 3.4
theroggy Dec 3, 2024
0161900
Skip test_read_geojson_error test for gdal < 2.5.2
theroggy Dec 4, 2024
e2f5755
Update CHANGES.md
theroggy Dec 4, 2024
d5a8c00
Process feedback
theroggy Dec 5, 2024
c96587e
Merge remote-tracking branch 'upstream/main' into ENH-capture-all-err…
theroggy Dec 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## 0.11.0 (????-??-??)

### Improvements

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

## 0.10.0 (2024-09-28)

### Improvements
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 int check_ogrerr(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) except -1
cdef void *check_pointer(self, void *ptr) except NULL
Loading
Loading