Esempio n. 1
0
        public InformationLog(AppErrorsEnum errorCode, String additionalData = "")
        {
            try
            {
                MakeDefault();

                var ex = new AppException(errorCode);

                LogType        = InformationLogTypeEnum.AppException;
                Group          = ex.GetType().FullName;
                Code           = ex.Code;
                Title          = ex.Message;
                Description    = ex.TranslateErrorMessage;
                AdditionalData = ex.ToString() + "\n:::" + additionalData;
            }
            catch (Exception e)
            {
                AdditionalData = e.ToString() + "\n:::" + additionalData;
            }
        }
Esempio n. 2
0
        public InformationLog(AppException ex, String additionalData = "")
        {
            try
            {
                MakeDefault();

                if (ex == null)
                {
                    return;
                }

                LogType        = InformationLogTypeEnum.AppException;
                Group          = ex.GetType().FullName;
                Code           = ex.Code;
                Title          = ex.Message;
                Description    = ex.TranslateErrorMessage;
                AdditionalData = ex.ToString() + "\n:::" + additionalData;
            }
            catch (Exception e)
            {
                AdditionalData = e.ToString() + "\n:::" + additionalData;
            }
        }