Converting error object to a string.