Catch SQL exceptions on runSQL