From 4489fd5039225d987f1b1873559d824d900610ba Mon Sep 17 00:00:00 2001 From: t-bltg Date: Mon, 30 Aug 2021 20:21:53 +0200 Subject: [PATCH] Revert try/catch for patch version --- RecipesPipeline/src/plot_recipe.jl | 33 ++++++++++++++++++------------ 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/RecipesPipeline/src/plot_recipe.jl b/RecipesPipeline/src/plot_recipe.jl index 5f6916094..9ac405ed4 100644 --- a/RecipesPipeline/src/plot_recipe.jl +++ b/RecipesPipeline/src/plot_recipe.jl @@ -27,21 +27,28 @@ function _process_plotrecipe(plt, kw, kw_list, still_to_process) push!(kw_list, kw) return end - st = kw[:seriestype] - st = kw[:seriestype] = type_alias(plt, st) - datalist = RecipesBase.apply_recipe(kw, Val{st}, plt) - 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)") + try + st = kw[:seriestype] + st = kw[:seriestype] = type_alias(plt, st) + datalist = RecipesBase.apply_recipe(kw, Val{st}, plt) + 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 + if err isa MethodError && occursin("plot recipe", err.args) + push!(kw_list, kw) + else + rethrow() end - else - push!(kw_list, kw) - end return end