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); }
public static void TratarExcecao(Exception ex, TipoDeLog tipo) { LogException.Tratar(ex, tipo); }