Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Test for error value from apply_recipe fallback. #95

Merged
merged 3 commits into from
Aug 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions src/plot_recipe.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,20 @@ function _process_plotrecipe(plt, kw, kw_list, still_to_process)
st = kw[:seriestype]
st = kw[:seriestype] = type_alias(plt, st)
datalist = RecipesBase.apply_recipe(kw, Val{st}, plt)
warn_on_recipe_aliases!(plt, datalist, :plot, st)
for data in datalist
preprocess_attributes!(plt, data.plotattributes)
if data.plotattributes[:seriestype] == st
error("Plot recipe $st returned the same seriestype: $(data.plotattributes)")
if !isnothing(datalist)
warn_on_recipe_aliases!(plt, datalist, :plot, st)
for data in datalist
preprocess_attributes!(plt, data.plotattributes)
if data.plotattributes[:seriestype] == st
error("Plot recipe $st returned the same seriestype: $(data.plotattributes)")
end
push!(still_to_process, data.plotattributes)
end
push!(still_to_process, data.plotattributes)
else
push!(kw_list, kw)
end
catch err
# the try/catch block can be removed when Plots.jl makes the compensating change
if err isa MethodError && occursin("plot recipe", err.args)
push!(kw_list, kw)
else
Expand Down