Skip to content

Better errors for missing Dict keysΒ #178

@rafaqz

Description

@rafaqz

It's possible to get errors like this when you try to create a file with the wrong data type, and the _GDALTYPE Dict is accessed:

ERROR: KeyError: key Int64 not found
Stacktrace:
 [1] getindex at ./dict.jl:467 [inlined]
 [2] #unsafe_create#56 at /root/.julia/packages/ArchGDAL/j9NPL/src/dataset.jl:200 [inlined]
 [3] create(::GeoData.var"#190#191"{GeoArray{Int64,3,Tuple{Lon{LinRange{Float64},Projected{

It could be better to throw a more descriptive error, like "Int64 is not a recognised data type" etc. I'm not sure if this also applies to the other const Dicts in use like _JLType

See https://github.com/rafaqz/GeoData.jl/issues/143

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions