Skip to content

Commit

Permalink
Only test error hint if it can be defined
Browse files Browse the repository at this point in the history
  • Loading branch information
penelopeysm committed Sep 12, 2024
1 parent d514c33 commit 03d0c72
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/logdensityproblems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
LogDensityProblems.logdensity(model, ones(10))
catch exc
@test exc isa MethodError
@test occursin("is a wrapper", sprint(showerror, exc))
if isdefined(Base.Experimental, :register_error_hint)
@test occursin("is a wrapper", sprint(showerror, exc))
end
end
end

Expand Down

0 comments on commit 03d0c72

Please sign in to comment.