Don't assume IP-style socket addresses in error messages.

Closes #900.