Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrap glue errors, if possible #294

Merged
merged 7 commits into from
Nov 28, 2023
Merged

Wrap glue errors, if possible #294

merged 7 commits into from
Nov 28, 2023

Conversation

hadley
Copy link
Member

@hadley hadley commented Jan 26, 2023

Fixes #229

R/transformer.R Outdated Show resolved Hide resolved
R/transformer.R Outdated Show resolved Hide resolved
R/transformer.R Outdated Show resolved Hide resolved
R/transformer.R Outdated Show resolved Hide resolved
R/sql.R Show resolved Hide resolved
R/transformer.R Outdated Show resolved Hide resolved
DESCRIPTION Show resolved Hide resolved
hadley and others added 3 commits March 27, 2023 10:50
Co-authored-by: Davis Vaughan <davis@rstudio.com>
#Conflicts:
#	DESCRIPTION
#	R/sql.R
@hadley hadley requested a review from jennybc March 27, 2023 15:57
Error:
! Failed to evaluate glue component {NOTFOUND}
Caused by error in `identity_transformer()`:
! argument "envir" is missing, with no default
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to be the error we're trying to test.

After staring long and hard at the CI failures, I realized this. I was puzzled why the R version mattered, since we're using rlang::abort(). But this error is coming from base R.

@jennybc
Copy link
Member

jennybc commented Nov 28, 2023

I think we either have to give identity_transformer(envir =) a default value or specify it explicitly in the tests that call it directly. envir = parent.frame() feels reasonable to me and consistent with other functions in glue. But I'm not wed to this solution.

@hadley
Copy link
Member Author

hadley commented Nov 28, 2023

Yeah, that looks right to me. Not sure how I missed it originally.

@hadley hadley merged commit db9b656 into main Nov 28, 2023
12 checks passed
@hadley hadley deleted the wrap-errors branch November 28, 2023 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FR: Error handling when variable is not found: specific error message and class
3 participants