Example #1
0
        public static void LogError(string userError, ErrorArea area, ErrorPriority priority, bool userNotified, Exception ex)
        {
            string methodName  = new StackFrame(1, true).GetMethod().Name;
            string errPriority = string.Empty;

            errPriority = GetDescription <ErrorPriority>(priority);

            string errArea = string.Empty;

            errArea = GetDescription <ErrorArea>(area);

            StringBuilder sb = new StringBuilder();

            if (ex != null)
            {
                sb.Append(string.Format("Error Message: {0} ", ex.Message));
                if (ex.InnerException != null)
                {
                    sb.Append(string.Format("Inner Exception: {0} ", ex.InnerException));
                }
                sb.Append(string.Format("Stack Trace: {0}", ex.StackTrace));
            }
        }
Example #2
0
 public static string ToName(this ErrorArea area)
 => area switch
 {