Skip to content

Commit

Permalink
Replace uses of error debug message with a thrown error
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurav-arya committed Mar 27, 2023
1 parent 425468a commit 5b4ed3d
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 5b4ed3d

Please sign in to comment.