Meaningful connection errors report a meaningful message

Fixes issue #173.