Skip to content

Commit

Permalink
improve message
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-lara committed Jul 1, 2024
1 parent 569a969 commit 5a87f42
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/system_data.jl
Original file line number Diff line number Diff line change
Expand Up @@ -620,15 +620,15 @@ function _check_single_time_series_transformed_parameters(
if desired_horizon > max_horizon
throw(
ConflictingInputsError(
"desired horizon = $(Dates.canonicalize(desired_horizon)) is greater than max horizon = $(Dates.canonicalize(max_horizon))",
"TimeSeries: $(get_name(metadata)) desired horizon = $(Dates.canonicalize(desired_horizon)) is greater than max horizon = $(Dates.canonicalize(max_horizon))",
),
)
end

if desired_horizon % resolution != Dates.Millisecond(0)
throw(
ConflictingInputsError(
"desired horizon = $(Dates.canonicalize(desired_horizon)) is not evenly divisible by resolution = $(Dates.canonicalize(resolution))",
"TimeSeries: $(get_name(metadata)) desired horizon = $(Dates.canonicalize(desired_horizon)) is not evenly divisible by resolution = $(Dates.canonicalize(resolution))",
),
)
end
Expand All @@ -641,7 +641,7 @@ function _check_single_time_series_transformed_parameters(
elseif desired_interval > max_interval
throw(
ConflictingInputsError(
"interval = $(Dates.canonicalize(desired_interval)) is bigger than the max of $(Dates.canonicalize(max_interval))",
"TimeSeries: $(get_name(metadata)) interval = $(Dates.canonicalize(desired_interval)) is bigger than the max of $(Dates.canonicalize(max_interval))",
),
)
end
Expand Down

0 comments on commit 5a87f42

Please sign in to comment.