From e8386253cd2001106f75974b46c23a4e5cc5ee10 Mon Sep 17 00:00:00 2001 From: Phillip Alday Date: Mon, 21 Aug 2023 16:19:47 -0500 Subject: [PATCH] break my tests Co-authored-by: Alex Arslan --- src/regressionmodel.jl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/regressionmodel.jl b/src/regressionmodel.jl index 1f8708f..91b91bc 100644 --- a/src/regressionmodel.jl +++ b/src/regressionmodel.jl @@ -145,12 +145,13 @@ _invlink_and_deriv(::typeof(identity), η) = (η, 1) # for now, this is private API, but we should see how this goes and whether we can make it public API # so local extensions (instead of Package-Extensions) are better supported _model_link(::RegressionModel, invlink::Function) = invlink -function _model_link(::RegressionModel, ::AutoInvLink) - @static if VERSION < v"1.9" - @error "AutoInvLink requires extensions and is thus not available on Julia < 1.9." +function _model_link(model::RegressionModel, ::AutoInvLink) + msg = string("cannot automatically determine inverse link for models ", + "of type ", typeof(model)) + @static if isdefined(Base, :get_extension) + msg *= "; no appropriate extension has been loaded" end - throw(ArgumentError("No appropriate extension is loaded for automatic " * - "determination of the inverse link for this model type")) + throw(ArgumentError(msg)) end function _difference_method!(eff::Vector{T}, err::Vector{T},