Added support for handling ConnectionError
Merge pull request #1 from t27/master

Added support for handling ConnectionError.

Thx for the commit.