Fix Socket encryption error message
Thrown object should be an Exception instance