The problems handler returns a character vector of parse
errors and can be used to validate input of any type
for which wk_handle() is defined.
wk_problems(handleable, ...)
wk_problems_handler()A geometry vector (e.g., wkb(), wkt(), xy(),
rct(), or sf::st_sfc()) for which wk_handle() is defined.
Passed to the wk_handle() method.
A character vector of parsing errors. NA signifies
that there was no parsing error.
wk_problems(new_wk_wkt(c("POINT EMTPY", "POINT (20 30)")))
#> [1] "Expected '(' or 'EMPTY' but found 'EMTPY' at byte 6"
#> [2] NA
wk_handle(
new_wk_wkt(c("POINT EMTPY", "POINT (20 30)")),
wk_problems_handler()
)
#> [1] "Expected '(' or 'EMPTY' but found 'EMTPY' at byte 6"
#> [2] NA