summaryrefslogtreecommitdiff
path: root/Gestor.Application/Helpers/Erro.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Gestor.Application/Helpers/Erro.cs')
-rw-r--r--Gestor.Application/Helpers/Erro.cs24
1 files changed, 0 insertions, 24 deletions
diff --git a/Gestor.Application/Helpers/Erro.cs b/Gestor.Application/Helpers/Erro.cs
deleted file mode 100644
index 52f70f5..0000000
--- a/Gestor.Application/Helpers/Erro.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using Gestor.Application.Views.Generic;
-using Gestor.Model.API;
-using System;
-using System.IO;
-using System.Runtime.CompilerServices;
-using System.Windows;
-using System.Windows.Threading;
-
-namespace Gestor.Application.Helpers
-{
- public static class Erro
- {
- public static void RegistrarErro(LogError log, bool abrirTela = true)
- {
- string str = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Gestor.Exceptions.log");
- File.AppendAllText(str, string.Format("CORRETORA: {1} - {2}{0} USUÁRIO LOGADO: {3}{0} VERSÃO: {4}{0} DATA: {5}{0} ERRO: {6} - {7}{0} HRESULT: {8}{0} HELPLINK: {9}{0} MESSAGE: {10}{0} SOURCE: {11}{0} STACKTRACE: {12}{0} MAQUINA: {13}{0} USUARIO MAQUINA: {14}{0} LINHA: {15}{0} OBJETO: {16}{0} {0}", new object[] { Environment.NewLine, log.get_IdFornecedor(), log.get_Fornecedor(), log.get_UsuarioLogado(), log.get_Versao(), log.get_Data(), log.get_IdErro(), log.get_Erro(), log.get_HResult(), log.get_HelpLink(), log.get_Message(), log.get_Source(), log.get_StackTrace(), log.get_Maquina(), log.get_UsuarioMaquina(), log.get_Linha(), log.get_Objeto() }));
- if (!abrirTela)
- {
- return;
- }
- System.Windows.Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() => (new ErrorWindow(log.get_IdErro(), false)).ShowDialog()));
- }
- }
-} \ No newline at end of file