Reverted SaveAsync on IAuditLgSaveHandle instead added AddException method.

pull/2625/head
Galip Tolga Erdem 6 years ago
parent 58d9f3fb5c
commit 73782c1408

@ -42,7 +42,7 @@ namespace Volo.Abp.AspNetCore.Auditing
}
catch (Exception ex)
{
await scope.SaveAsync(ex).ConfigureAwait(false);
scope.AddException(ex);
}
finally
{

@ -150,16 +150,13 @@ namespace Volo.Abp.Auditing
StopWatch = stopWatch;
}
public async Task SaveAsync(Exception exception = null)
{
if (exception != null)
{
this.AuditLog.Exceptions.Add(exception);
}
else
{
await _auditingManager.SaveAsync(this).ConfigureAwait(false);
}
public async Task SaveAsync()
{
await _auditingManager.SaveAsync(this).ConfigureAwait(false);
}
public void AddException(Exception exception)
{
this.AuditLog.Exceptions.Add(exception);
}
public void Dispose()

@ -5,6 +5,7 @@ namespace Volo.Abp.Auditing
{
public interface IAuditLogSaveHandle : IDisposable
{
Task SaveAsync(Exception exception = null);
Task SaveAsync();
void AddException(Exception exception);
}
}
Loading…
Cancel
Save