Open mgirlich opened 2 years ago
This is a bit more complicated than expected. At least there is only little documentation how to catch R errors and pass them along to a custom error handler. Also see https://github.com/r-lib/cpp11/issues/277
Idea: change Path
to a Context
class that carries more information: path to element of x
, path to field spec, where the error was thrown e.g. when applying transform
or when casting to ptype
or ptype_inner
.
The error message is currently not very helpful. It should mention
transform
tib()
(or at least the name) where the issue wasCreated on 2022-07-27 by the reprex package (v2.0.1)
Probably this needs
R_tryEvalSilent()
, see Errors and Evaluation