Skip to content

Commit

Permalink
Fix the buffer error hinter (#163)
Browse files Browse the repository at this point in the history
* Fix the buffer error hinter

* Update buffer.jl
  • Loading branch information
asinghvi17 committed Jun 19, 2024
1 parent 0d15e9c commit 260f14c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/methods/buffer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ end
# which checks if there is a method error for the geos backend.


# Add an error hint for GeodesicSegments if Proj is not loaded!
# Add an error hint for `buffer` if LibGEOS is not loaded!
function _buffer_error_hinter(io, exc, argtypes, kwargs)
if isnothing(Base.get_extension(GeometryOps, :GeometryOpsLibGEOSExt)) && exc.f == buffer && first(exc.argtypes) == GEOS
if isnothing(Base.get_extension(GeometryOps, :GeometryOpsLibGEOSExt)) && exc.f == buffer && first(argtypes) == GEOS
print(io, "\n\nThe `buffer` method requires the LibGEOS.jl package to be explicitly loaded.\n")
print(io, "You can do this by simply typing ")
printstyled(io, "using LibGEOS"; color = :cyan, bold = true)
println(io, " in your REPL, \nor otherwise loading LibGEOS.jl via using or import.")
end
end
end

0 comments on commit 260f14c

Please sign in to comment.