fix bug in which `logError` could not resolve an err without `message`

fixed #4381
 - if an error object has no property `message`, an new error could been produced