public void FormatTokenInMessage()
        {
            Guid   id = Guid.NewGuid();
            string formattedMessage = ExceptionUtility.FormatExceptionMessage(idMessage, id);

            Assert.AreEqual("ID : " + id.ToString(), formattedMessage);
        }
            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);
            }
示例#3
0
 public static string FormatExceptionMessage(string message, Guid handlingInstanceID)
 {
     return(ExceptionUtility.FormatExceptionMessage(message, handlingInstanceID));
 }