core: code cleanup, exception messages (#9631)

This commit is contained in:
Diego Heras
2020-09-24 22:02:45 +02:00
committed by GitHub
parent 39f7add32b
commit b212169dc2
11 changed files with 180 additions and 276 deletions

View File

@@ -223,16 +223,16 @@ namespace Jackett.Server.Controllers
var aggregateTask = Task.WhenAll(tasks);
await aggregateTask;
}
catch (AggregateException aex)
catch (AggregateException e)
{
foreach (var ex in aex.InnerExceptions)
foreach (var ex in e.InnerExceptions)
{
logger.Error(ex);
}
}
catch (Exception ex)
catch (Exception e)
{
logger.Error(ex);
logger.Error(e);
}
manualResult.Indexers = tasks.Select(t =>
@@ -440,10 +440,10 @@ namespace Jackett.Server.Controllers
return Content(xml, "application/rss+xml", Encoding.UTF8);
}
catch (Exception ex)
catch (Exception e)
{
logger.Error(ex);
return GetErrorXML(900, ex.ToString());
logger.Error(e);
return GetErrorXML(900, e.ToString());
}
}