Throw an exception when connection fails
Merge pull request #1 from hairmare/feature/except-on-connect-fail

throw an exception when connection fails