Skip to content

Commit 4ca1769

Browse files
Apply suggestions from code review
Co-authored-by: David Widmann <[email protected]>
1 parent f73b630 commit 4ca1769

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/AbstractMCMC.jl

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,14 @@ include("stepper.jl")
8888
include("transducer.jl")
8989
include("logdensityproblems.jl")
9090

91-
function __init__()
92-
if isdefined(Base.Experimental, :register_error_hint)
91+
if isdefined(Base.Experimental, :register_error_hint)
92+
function __init__()
9393
Base.Experimental.register_error_hint(MethodError) do io, exc, argtypes, _
9494
if Base.parentmodule(exc.f) == LogDensityProblems &&
9595
any(a -> a <: LogDensityModel, argtypes)
96-
printstyled(
96+
print(
9797
io,
98-
"\nAbstractMCMC.LogDensityModel is a wrapper and does not itself implement the LogDensityProblems.jl interface. To use LogDensityProblems.jl methods, access the inner type with (e.g.) `logdensity(model.logdensity, params)` instead of `logdensity(model, params)`.";
99-
color=:cyan,
98+
"\n`AbstractMCMC.LogDensityModel` is a wrapper and does not itself implement the LogDensityProblems.jl interface. To use LogDensityProblems.jl methods, access the inner type with (e.g.) `logdensity(model.logdensity, params)` instead of `logdensity(model, params)`.",
10099
)
101100
end
102101
end

0 commit comments

Comments
 (0)