internal static string GetExceptionMessage(Exception exception) { if (SsmUtility.IsTransientException(exception)) { return(exception.Message); } else { return(exception.ToString()); } }
/// <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)); } }