-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Currently when there is an error in rimpala.query the error text is just "SQL error" however prior to throwing the error it prints what the actual error is. If running from an R console this is fine however when using something like a Shiny interface there does not appear to be a way to capture the actual printed error (I tried capture.output around a tryCatch but that does not work).
Ex.:
rimpala.query(Q="select version")
Error: AnalysisException: couldn't resolve column reference: 'version'
Error in rimpala.query(Q = "select version") : SQL error
The first "Error:" above is just printed out, the 2nd is the actual error thrown. I would like to be able to see the first in my Shiny interface to be able to troubleshoot issues better. I suspect the first is being printed during "rs = impalaObj$query(Q)" in RImpala.R and needs to be captured from there....?
An example attempt to capture the print:
test <- paste(tryCatch(rimpala.query(Q="version"), error = function(e) {}))
Error: Can't create Statement, connection is closed
test
character(0)
When I would either like test to = "Error: Can't create Statement, connection is closed" or e in the error capture to contain that message instead of "SQL error".