Skip to content

Commit f191085

Browse files
Merge pull request #231 from gaurav-arya/ag-error
Replace uses of error debug message with a thrown error
2 parents 425468a + 5b4ed3d commit f191085

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/differentiation/jaches_products.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ function JacVec(f, u::AbstractArray, p = nothing, t = nothing; autodiff = AutoFo
239239

240240
(cache1, cache2), auto_jacvec, auto_jacvec!
241241
else
242-
@error("Set autodiff to either AutoForwardDiff(), or AutoFiniteDiff()")
242+
error("Set autodiff to either AutoForwardDiff(), or AutoFiniteDiff()")
243243
end
244244

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

282282
(cache1, cache2), autoback_hesvec, autoback_hesvec!
283283
else
284-
@error("Set autodiff to either AutoForwardDiff(), AutoZygote(), or AutoFiniteDiff()")
284+
error("Set autodiff to either AutoForwardDiff(), AutoZygote(), or AutoFiniteDiff()")
285285
end
286286

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

315315
(cache1, cache2), auto_hesvecgrad, auto_hesvecgrad!
316316
else
317-
@error("Set autodiff to either AutoForwardDiff(), or AutoFiniteDiff()")
317+
error("Set autodiff to either AutoForwardDiff(), or AutoFiniteDiff()")
318318
end
319319

320320
outofplace = static_hasmethod(f, typeof((u,)))

0 commit comments

Comments
 (0)