Пример #1
0
        public static void WriteError(Exception exception)
        {
            if (App.Settings == null || App.Settings.WriteErrorFiles)
            {
                ErrorManipulator.WriteError(exception, $@"{App.MainPath}\File Protect\{DateTime.Now.ToString("MMddyyyyHHmmss")}-{exception.HResult}.err");

                Logs.WriteLog($"CRITICALERROR-{exception.Message}");
                Logs.WriteLog($"\"{App.MainPath}\\File Protect\\{DateTime.Now.ToString("MMddyyyyHHmmss")}-{exception.HResult}.err\" has been created");
            }
            else
            {
                return;
            }
        }
Пример #2
0
        private static void WriteError(Exception exception)
        {
            string path = $@"{Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)}\DES Destry\File Protect\{DateTime.Now.ToString("MMddyyyyHHmmss")}-{exception.HResult}.err";

            ErrorManipulator.WriteError(exception, path);
        }