Open mgirlich opened 1 year ago
There may be a condition class somewhere in the DB stack that throws errors when accessing unknown [[
fields. If that is the case I think that's a design issue with the class.
This appears to be some interaction between rlang and rJava (DatabaseConnector uses rJava):
tryCatch(
rJava::J("blah"),
error = function(cnd) {
rlang::abort("Rethrow.", parent = cnd)
}
)
# Error in ._jobjRef_dollar(x[["jobj"]], name) :
# no field, method or inner class called 'use_cli_format'
So rJava appears to throw errors that are in some way considered illegal by rlang?
Good find. The restrictions added to error objects by rJava subclasses make it hard to work with generically.
I found this while working on https://github.com/tidyverse/dbplyr/issues/1186. Unfortunately, you need to install the DatabaseConnector package (https://github.com/OHDSI/DatabaseConnector) to run the reprex.
Created on 2023-04-25 with reprex v2.0.2