From 5772a888bdc3eecc1866142469e2478aec5e786b Mon Sep 17 00:00:00 2001 From: Teun van den Brand Date: Wed, 31 Jan 2024 09:58:28 +0100 Subject: [PATCH 1/2] replace `tryCatch()` with `try_fetch()` --- R/facet-.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/facet-.R b/R/facet-.R index c2d7dc8df7..7c6c749cab 100644 --- a/R/facet-.R +++ b/R/facet-.R @@ -477,7 +477,7 @@ eval_facet <- function(facet, data, possible_columns = NULL) { mask <- new_data_mask(env) mask$.data <- as_data_pronoun(mask) - tryCatch( + try_fetch( eval_tidy(facet, mask), ggplot2_missing_facet_var = function(e) NULL ) From b22e6b39c28fb11d08fe5a0d60495cf6942b1639 Mon Sep 17 00:00:00 2001 From: Teun van den Brand Date: Tue, 27 Feb 2024 16:30:52 +0100 Subject: [PATCH 2/2] add news bullet --- NEWS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS.md b/NEWS.md index 40e6ac725c..0828f7957f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,6 +3,8 @@ * Fixed bug where discrete scales could not map aesthetics only consisting of `NA`s (#5623) +* Facet evaluation is better at dealing with inherited errors + (@teunbrand, #5670). # ggplot2 3.5.0