Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more error info to query errors #4

Open
JustinEngelman opened this issue Nov 11, 2014 · 0 comments
Open

Add more error info to query errors #4

JustinEngelman opened this issue Nov 11, 2014 · 0 comments

Comments

@JustinEngelman
Copy link

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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant