Exemplo n.º 1
0
        private static string FormatError(Exception ex)
        {
            var buffer = new StringBuilder(0x4000);

            ErrorFormatter.Append(buffer, ex);
            return(HtmlEncode(buffer));
        }
Exemplo n.º 2
0
        public bool HandleException(Exception ex)
        {
            if (m_eventLog != null)
            {
                var buffer = new StringBuilder(0x1000);
                buffer
                .AppendLine("Error Report")
                .AppendLine();
                ErrorFormatter.Append(buffer, ex);
                m_eventLog.WriteEntry(buffer.ToString(), EventLogEntryType.Error, m_eventId);
            }

            return(false);
        }