Skip to content

Commit

Permalink
fix: improved error message for sample rate check
Browse files Browse the repository at this point in the history
The previous messaged could repeate `Hz` twice
  • Loading branch information
haberdashPI committed Nov 5, 2019
1 parent 194622f commit b19caf5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/arrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function signal(x::AbstractArray{<:Any,N},::IsSignal,
end
function signal(x::AxisArray,::IsSignal,fs::Union{Missing,Number}=missing)
if !isconsistent(fs,samplerate(x))
error("Signal expected to have sample rate of $fs Hz.")
error("Signal expected to have sample rate of $(inHz(fs)) Hz.")
else
x
end
Expand Down
2 changes: 1 addition & 1 deletion src/signal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function signal(x,::IsSignal,fs)
if ismissing(samplerate(x))
tosamplerate(x,fs)
elseif !isconsistent(fs,samplerate(x))
error("Signal expected to have sample rate of $fs Hz.")
error("Signal expected to have sample rate of $(inHz(fs)) Hz.")
else
x
end
Expand Down

0 comments on commit b19caf5

Please sign in to comment.