Exemple #1
0
 internal static string GetExceptionMessage(Exception exception)
 {
     if (SsmUtility.IsTransientException(exception))
     {
         return(exception.Message);
     }
     else
     {
         return(exception.ToString());
     }
 }
Exemple #2
0
        /// <summary>
        /// Report an exception
        /// </summary>
        private void ReportException(Exception exception)
        {
            if (SsmUtility.IsTransientException(exception))
            {
                Trace.WriteLine("SsmLogger.ReportException: " + exception.Message);
            }
            else
            {
                Trace.WriteLine("SsmLogger.ReportException: " + exception.ToString());
            }

            EventHandler <ExceptionEventArgs> handler = this.Exception;

            if (handler != null)
            {
                handler(this, new ExceptionEventArgs(exception));
            }
        }