diff --git a/DifferentiationInterface/src/compat.jl b/DifferentiationInterface/src/compat.jl index ec3076827..40468ab8d 100644 --- a/DifferentiationInterface/src/compat.jl +++ b/DifferentiationInterface/src/compat.jl @@ -5,7 +5,7 @@ macro public(ex) elseif Base.isexpr(ex, :tuple) ex.args else - error("something informative") + error("Expected a symbol or a tuple of symbols, got $(repr(ex))") end esc(Expr(:public, args...)) else diff --git a/DifferentiationInterface/src/utils/traits.jl b/DifferentiationInterface/src/utils/traits.jl index 017f0d47a..0858d7664 100644 --- a/DifferentiationInterface/src/utils/traits.jl +++ b/DifferentiationInterface/src/utils/traits.jl @@ -75,7 +75,7 @@ pushforward_performance(::ReverseMode) = PushforwardSlow() pushforward_performance(::SymbolicMode) = PushforwardFast() function pushforward_performance(backend::Union{AutoSparse, SecondOrder}) - throw(ArgumentError("Pushforward performance not defined for $backend`.")) + throw(ArgumentError("Pushforward performance not defined for `$backend`.")) end ## Pullback @@ -108,7 +108,7 @@ pullback_performance(::ReverseMode) = PullbackFast() pullback_performance(::SymbolicMode) = PullbackFast() function pullback_performance(backend::Union{AutoSparse, SecondOrder}) - throw(ArgumentError("Pullback performance not defined for $backend`.")) + throw(ArgumentError("Pullback performance not defined for `$backend`.")) end ## HVP @@ -170,7 +170,7 @@ function hvp_mode(ba::SecondOrder) end function hvp_mode(backend::AutoSparse) - throw(ArgumentError("HVP mode not defined for $backend`.")) + throw(ArgumentError("HVP mode not defined for `$backend`.")) end ## Inner prep