@B338:R Changed to throw exception with relevant error messages.

This technique isn't new since we already used it for connect().