mysqli catch connection errors properly