Raise a custom Exception on connection error