From 4729abf0bdb2e7430ea339aca1775da41cb6ecad Mon Sep 17 00:00:00 2001 From: tiemvanderdeure Date: Thu, 31 Aug 2023 10:18:29 +0200 Subject: [PATCH] fix extension error function --- src/extensions.jl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/extensions.jl b/src/extensions.jl index fae40342f..0fdf95afe 100644 --- a/src/extensions.jl +++ b/src/extensions.jl @@ -1,10 +1,10 @@ # extensions -function throw_extension_error(package::String, extension::Symbol) +function throw_extension_error(f::Function, package::String, extension::Symbol, args) @static if isdefined(Base, :get_extension) # julia > 1.9 if isnothing(Base.get_extension(Rasters, extension)) throw(BackendException(package)) else - throw(MethodError(resample, args)) + throw(MethodError(f, args)) end else throw(BackendException(package)) @@ -13,9 +13,9 @@ end # stubs that need ArchGDAL -resample(args...; kw...) = throw_extension_error("ArchGDAL", :RastersArchGDALExt) -warp(args...; kw...) = throw_extension_error("ArchGDAL", :RastersArchGDALExt) -cellsize(args...; kw...) = throw_extension_error("ArchGDAL", :RastersArchGDALExt) +resample(args...; kw...) = throw_extension_error(resample, "ArchGDAL", :RastersArchGDALExt, args) +warp(args...; kw...) = throw_extension_error(warp, "ArchGDAL", :RastersArchGDALExt, args) +cellsize(args...; kw...) = throw_extension_error(cellsize, "ArchGDAL", :RastersArchGDALExt, args) # Other shared stubs function layerkeys end