title: How to get nill or messege instead of app failing when running wrong query with PG ruby
body: <p>I am trying to make an SQL checker app with ruby using PG gem. Is there any way for the app to not give me an error when running a SQL that is not correct. Instead of error get nill or the error as a string. </p>