processx icon indicating copy to clipboard operation
processx copied to clipboard

`$call` should be a call or `NULL` in error objects

Open gaborcsardi opened this issue 2 years ago • 3 comments

❯ processx::run("false")
Error in `processx::run("false")`:
! System command 'false' failed
---
Exit status: 1
Stderr: <empty>
---
Type .Last.error to see the more details.

❯ .Last.error$call
[1] "processx::run(\"false\")"

So we should use another field for the call string.

gaborcsardi avatar Apr 13 '23 08:04 gaborcsardi

Or maybe just zap the srcrefs if that is the problem?

lionel- avatar Apr 13 '23 09:04 lionel-

It is not the only problem, calls may contain large objects.

gaborcsardi avatar Apr 13 '23 09:04 gaborcsardi

Supplying a string can be generally useful for non-call contexts. Should we use the field $context? We've also started namespacing fields inside $rlang for $rlang$inherit, I guess that'd be a good idea here too.

lionel- avatar Apr 13 '23 09:04 lionel-