Skip to content

cannot suppress full warining #96

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

Open
gbisschoff opened this issue Jan 12, 2018 · 0 comments
Open

cannot suppress full warining #96

gbisschoff opened this issue Jan 12, 2018 · 0 comments

Comments

@gbisschoff
Copy link

suppressWarnings(exp) only suppresses half of the messgage. The part of the warning that is related to the psql error (probably received from the database) cannot be suppressed. E.g

add_user(test_con,"NamE","Email","Password") returns the psql error and an R warning

Error in postgresqlExecStatement(conn, statement, ...) : RS-DBI driver: (could not Retrieve the result : ERROR: relation "users" does not exist LINE 1: INSERT INTO users (name,email,password) values('NamE','Email... ^ )

Warning message: In postgresqlQuickSQL(conn, statement, ...) : Could not create execute: INSERT INTO users (name,email,password) values('NamE','Email','6eb12216e1e7515eda6da7104bccf246') RETURNING user_id;

When suppressing warnings suppressWarnings(add_user(test_con,"NamE","Email","Password")) it still returns the first part:

Error in postgresqlExecStatement(conn, statement, ...) : RS-DBI driver: (could not Retrieve the result : ERROR: relation "users" does not exist LINE 1: INSERT INTO users (name,email,password) values('NamE','Email... ^ )

Add the message returned from postgres to the R warning message rather than in a separate print. (PS it makes my unit test look dirty)

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