Skip to content

Commit

Permalink
Merge pull request #231 from gaurav-arya/ag-error
Browse files Browse the repository at this point in the history
Replace uses of error debug message with a thrown error
  • Loading branch information
ChrisRackauckas committed Mar 27, 2023
2 parents 425468a + 5b4ed3d commit f191085
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/differentiation/jaches_products.jl
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ function JacVec(f, u::AbstractArray, p = nothing, t = nothing; autodiff = AutoFo

(cache1, cache2), auto_jacvec, auto_jacvec!
else
@error("Set autodiff to either AutoForwardDiff(), or AutoFiniteDiff()")
error("Set autodiff to either AutoForwardDiff(), or AutoFiniteDiff()")
end

outofplace = static_hasmethod(f, typeof((u,)))
Expand Down Expand Up @@ -281,7 +281,7 @@ function HesVec(f, u::AbstractArray, p = nothing, t = nothing; autodiff = AutoFo

(cache1, cache2), autoback_hesvec, autoback_hesvec!
else
@error("Set autodiff to either AutoForwardDiff(), AutoZygote(), or AutoFiniteDiff()")
error("Set autodiff to either AutoForwardDiff(), AutoZygote(), or AutoFiniteDiff()")
end

outofplace = static_hasmethod(f, typeof((u,)))
Expand Down Expand Up @@ -314,7 +314,7 @@ function HesVecGrad(f, u::AbstractArray, p = nothing, t = nothing; autodiff = Au

(cache1, cache2), auto_hesvecgrad, auto_hesvecgrad!
else
@error("Set autodiff to either AutoForwardDiff(), or AutoFiniteDiff()")
error("Set autodiff to either AutoForwardDiff(), or AutoFiniteDiff()")
end

outofplace = static_hasmethod(f, typeof((u,)))
Expand Down

0 comments on commit f191085

Please sign in to comment.