GeoDataFrames.jl icon indicating copy to clipboard operation
GeoDataFrames.jl copied to clipboard

Friendlier error messages when file not found

Open niclasmattsson opened this issue 1 year ago • 2 comments

This is an upstream problem in ArchGDAL but I'm opening it here (since this package seems to be aimed at making ArchGDAL's weird pointer-based types friendlier to work with). Here's the problem in a nutshell:

julia> gdf = GDF.read("doesnt_exist.gpkg")
ERROR: GDALError (CE_Failure, code 10):
        Pointer 'hDS' is NULL in 'GDALDatasetH'.

Could we have read() check if a file exists before passing it on to ArchGDAL, and throw a friendlier error message if it doesn't exist?

niclasmattsson avatar Apr 25 '23 10:04 niclasmattsson