FIXBUG 829: expect the appropriate exception for ProtocolError
Merge pull request #1047 from hvnsweeting/branch-1.4

FIXBUG 829: expect the appropriate exception for ProtocolError