예제 #1
0
        private void HandleLogInfo(LogInfo info)
        {
            try
            {
                info.Request = DependencyInjectionFactory.TryToResolveIRequest()?.UserRequest;
                LogToDbException(info);
            }
            catch (Exception ex)
            {
                try
                {
                    LogToFileException(info);
                    var log = new LogInfo();
                    log.OccuredException = ex;
                    log.CustomMessage    = "خطا در هنگام ثبت لاگ در دیتابیس!";

                    LogToFileException(log);
                }
                catch
                {
                }
            }

            if (info.RaiseThrowException)
            {
                throw info.OccuredException;
            }
        }