From d6910970b452ae5a0fc6e611ec83d9ce375a17f0 Mon Sep 17 00:00:00 2001 From: Samuel Badr Date: Tue, 12 Sep 2023 14:40:15 +0200 Subject: [PATCH] Fix error message in MatsubaraFreq ctor --- src/freq.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freq.jl b/src/freq.jl index d127b66..3f3a8aa 100644 --- a/src/freq.jl +++ b/src/freq.jl @@ -69,7 +69,7 @@ struct MatsubaraFreq{S<:Statistics} <: Number MatsubaraFreq(stat::Statistics, n::Integer) = new{typeof(stat)}(n) function MatsubaraFreq{S}(n::Integer) where {S<:Statistics} - allowed(S, n) || error("Frequency $(n)π/β is not $stat") + allowed(S, n) || throw(DomainError(n, "Frequency $(n)π/β is not $S")) return new{S}(n) end end