fix mistake of rethrowing exception (which loses call stack) to just throw (which does not)

This commit is contained in:
2020-09-21 18:54:30 +00:00
parent 632ea2e48e
commit 2193e36161
9 changed files with 10 additions and 10 deletions

View File

@@ -154,7 +154,7 @@ namespace AyaNova.Api.Controllers
}
else
{
throw ex;
throw;
}
}
@@ -223,7 +223,7 @@ namespace AyaNova.Api.Controllers
}
else
{
throw ex;
throw;
}
}

View File

@@ -208,7 +208,7 @@ namespace AyaNova.Biz
log.LogError(ex, "AttachmentMaintenanceJob error during ops");
await JobsBiz.LogJobAsync(job.GId, $"AttachmentMaintenanceJob error during ops\r\n{ex.Message}");
throw ex;
throw;
}
finally
{

View File

@@ -96,7 +96,7 @@ namespace AyaNova.Biz
}
catch (Exception ex)
{
throw ex;
throw;
}
}
}

View File

@@ -522,7 +522,7 @@ namespace AyaNova.Biz
//(it might also mean other things wrong with template)
// var v=await page.GetContentAsync();
throw ex;
throw;
}
}
}

View File

@@ -118,7 +118,7 @@ namespace AyaNova.Biz
await JobsBiz.LogJobAsync(Guid.Empty, ExceptionUtil.ExtractAllExceptionMessages(ex));
log.LogError(ex, "Backup failed");
await NotifyEventProcessor.AddGeneralNotifyEvent(NotifyEventType.BackupStatus, "Backup failed","Backup", ex);
throw ex;
throw;
}
finally
{

View File

@@ -570,7 +570,7 @@ namespace AyaNova.Util
{
log.LogError(ex, $"FileUtil::BackupAttachments");
}
throw ex;
throw;
}
}

View File

@@ -579,7 +579,7 @@ namespace AyaNova.Core
else
{
//some other error
if (calledFromInternalJob) throw ex;
if (calledFromInternalJob) throw;
var msg = "E1020 - Error fetching / installing license key";
log.LogError(ex, msg);
return msg;

View File

@@ -34,7 +34,7 @@ namespace AyaNova.Util
{
log.LogError(ex, $"RunProgram error running command:{cmd} {arguments}");
}
throw ex;
throw;
}

View File

@@ -482,7 +482,7 @@ namespace AyaNova.Util
log.LogError(ex, "Seeder:SeedDatabase error during ops");
if (LogJob)
await JobsBiz.LogJobAsync(JobId, $"Seeder:SeedDatabase error during ops\r\n{ex.Message}");
throw ex;
throw;
}
finally
{