Minor fix to exception handling, appears to have decreased db errors

Since adding the exception handling, which now only increments the
open connections on successful completion the number of database
connection errors have decreased. Currently I cannot replicate the
database connection errors anymore.