Improve abortfilepath exception
MODIFY
WalletWasabi/Models/ChaumianCoinJoin/CcjRound.cs
WalletWasabi/Models/ChaumianCoinJoin/CcjRound.cs
@@ -7,6 +7,7 @@ using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
+using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using WalletWasabi.Helpers;
@@ -851,7 +852,7 @@ namespace WalletWasabi.Models.ChaumianCoinJoin
Logger.LogInfo($"Round ({RoundId}): Succeeded.");
}
- public void Abort(string reason, bool syncLock = true)
+ public void Abort(string reason, bool syncLock = true, [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
{
if (syncLock)
{
@@ -867,11 +868,11 @@ namespace WalletWasabi.Models.ChaumianCoinJoin
if (string.IsNullOrWhiteSpace(reason))
{
- Logger.LogInfo($"Round ({RoundId}): Aborted.");
+ Logger.LogInfo($"Round ({RoundId}): Aborted.", callerFilePath: callerFilePath, callerLineNumber: callerLineNumber);
}
else
{
- Logger.LogInfo($"Round ({RoundId}): Aborted. Reason: {reason}.");
+ Logger.LogInfo($"Round ({RoundId}): Aborted. Reason: {reason}.", callerFilePath: callerFilePath, callerLineNumber: callerLineNumber);
}
}

MODIFY
WalletWasabi/Services/CcjCoordinator.cs
WalletWasabi/Services/CcjCoordinator.cs
@@ -5,6 +5,7 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
+using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using WalletWasabi.Crypto;
@@ -360,13 +361,13 @@ namespace WalletWasabi.Services
}
}
- public void AbortAllRoundsInInputRegistration(string reason)
+ public void AbortAllRoundsInInputRegistration(string reason, [CallerFilePath] string callerFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
{
using (RoundsListLock.Lock())
{
foreach (var r in Rounds.Where(x => x.Status == CcjRoundStatus.Running && x.Phase == CcjRoundPhase.InputRegistration))
{
- r.Abort(reason);
+ r.Abort(reason, callerFilePath: callerFilePath, callerLineNumber: callerLineNumber););
}
}
}

Improve abortfilepath exception