Skip to content

Commit

Permalink
Remove get_last_error_msg again as it is only used in one location an…
Browse files Browse the repository at this point in the history
…d all logic was moved to clean_error_message
  • Loading branch information
theroggy committed Nov 14, 2024
1 parent 723ce9a commit 8562c9f
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions pyogrio/_err.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ cdef inline object check_last_error():
"""
err_type = CPLGetLastErrorType()
err_no = CPLGetLastErrorNo()
err_msg = get_last_error_msg()
err_msg = clean_error_message(CPLGetLastErrorMsg())

if err_type == CE_Failure:
CPLErrorReset()
Expand All @@ -176,17 +176,6 @@ cdef inline object check_last_error():
return


cdef get_last_error_msg():
"""Checks GDAL error stack for the latest error message.
Returns
-------
An error message or empty string
"""
return clean_error_message(CPLGetLastErrorMsg())


cdef clean_error_message(const char* err_msg):
"""Cleans up error messages from GDAL.
Expand Down

0 comments on commit 8562c9f

Please sign in to comment.