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

chore: Pass error call to vec_as_location() #1237

Merged
merged 5 commits into from
Jul 21, 2022
Merged

chore: Pass error call to vec_as_location() #1237

merged 5 commits into from
Jul 21, 2022

Conversation

lionel-
Copy link
Member

@lionel- lionel- commented Jul 21, 2022

Part of #1065.

This is just a POC for how to better support error calls in tibble. In this case I'm just passing the relevant call = caller_env() down to vctrs functions. You can also pass it to abort(), or you can assign cnd$call <- <caller_env> before calling cnd_signal().

Note that input checking functions that check a particular argument should also pass arg to abort(). The last version of rlang now highlights the corresponding argument in the backtrace. The function call is also highlighted, provided a frame environment was supplied as call.

@krlmlr
Copy link
Member

krlmlr commented Jul 21, 2022

Can you please merge the main branch? I can do it but want to avoid collisions because this seems active now.

@krlmlr
Copy link
Member

krlmlr commented Jul 21, 2022

Let's wait for #1239.

@krlmlr
Copy link
Member

krlmlr commented Jul 21, 2022

Done now.

@krlmlr krlmlr changed the title Pass error call to vec_as_location() chore: Pass error call to vec_as_location() Jul 21, 2022
@krlmlr
Copy link
Member

krlmlr commented Jul 21, 2022

Thanks, this looks so much better now! I'll go through all internal calls to abort() to incorporate this pattern for the CRAN release after next.

@krlmlr krlmlr merged commit fccffe9 into main Jul 21, 2022
@krlmlr
Copy link
Member

krlmlr commented Jul 21, 2022

Thanks!

@lionel- lionel- deleted the fix-error-call branch July 21, 2022 20:12
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants