Ejemplo n.º 1
0
        public static void Tratar(Exception ex, TipoDeLog tipo)
        {
            if (ex.GetType() == typeof(ArgumentException))
            {
                throw new InvalidPluginExecutionException(ex.Message);
            }

            if (ex.GetType() == typeof(ArgumentNullException))
            {
                throw new InvalidPluginExecutionException(ex.Message);
            }

            if (ex.GetType() == typeof(InvalidPluginExecutionException))
            {
                throw ex;
            }

            LogService.GravaLog(ex, tipo);
            throw new InvalidPluginExecutionException(ex.Message);
        }
Ejemplo n.º 2
0
 public static void TratarExcecao(Exception ex, TipoDeLog tipo)
 {
     LogException.Tratar(ex, tipo);
 }