Skip to content

Commit

Permalink
Describe what was found in the file extension when erroring (#120)
Browse files Browse the repository at this point in the history
This allows things like `".shp "` to get diagnosed more easily, since dragging a file on Mac produces this kind of string (with a space at the end).
  • Loading branch information
asinghvi17 committed Sep 17, 2024
1 parent 7bc5cad commit 75f9c43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function _shape_paths(path)
elseif ext == ""
shp = string(stempath, ".shp")
else
throw(ArgumentError("Provide the shapefile with either `.shp` or no extension"))
throw(ArgumentError("Provide the shapefile with either `.shp` or no extension.\nFound `$ext`."))
end

shx = string(stempath, ".shx")
Expand Down

0 comments on commit 75f9c43

Please sign in to comment.