Catch all exceptions in connection