set up error handlers before connecting..
0.5.1
Merge pull request #30 from zeevl/capture-connection-errors

set up error handlers before connecting