private string FormatErrorMessage(Exception exception, Guid handlingInstanceId)
{
var pattern = this.message ?? exception.Message;
if (this.appendHandlingId)
{
pattern = string.Format(
CultureInfo.InvariantCulture,
"{0}. [Error ID: {{handlingInstanceID}}]",
pattern.Trim(' ', '.'));
}
var error = ExceptionUtility.FormatExceptionMessage(pattern, handlingInstanceId);
return error;
}