Adjust impossible exception messages
MODIFY
WalletWasabi.Backend/Controllers/ChaumianCoinJoinController.cs
WalletWasabi.Backend/Controllers/ChaumianCoinJoinController.cs
@@ -596,7 +596,7 @@ namespace WalletWasabi.Backend.Controllers
}
else
{
- return NotFound("Hex not found. This is impossible.");
+ return NotFound("Hex not found. This should never happen.");
}
}
default:

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/CoinViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/CoinViewModel.cs
@@ -160,7 +160,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
SmartCoinStatus.MixingSigning => "This coin is currently in Signing phase.",
SmartCoinStatus.SpentAccordingToBackend => "According to the Backend, this coin is spent. Wallet state will be corrected after confirmation.",
SmartCoinStatus.MixingWaitingForConfirmation => "Coinjoining unconfirmed coins is not allowed, unless the coin is a coinjoin output itself.",
- _ => "This is impossible."
+ _ => "This should never happen."
};
public Money Amount => Model.Amount;

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/SendControlViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/SendControlViewModel.cs
@@ -776,7 +776,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
break;
default:
- throw new NotSupportedException("This is impossible.");
+ throw new NotSupportedException("This should never happen.");
}
}
}

MODIFY
WalletWasabi/Blockchain/TransactionBuilding/PaymentIntent.cs
WalletWasabi/Blockchain/TransactionBuilding/PaymentIntent.cs
@@ -69,7 +69,7 @@ namespace WalletWasabi.Blockchain.TransactionBuilding
}
else
{
- throw new NotSupportedException("This is impossible.");
+ throw new NotSupportedException("This should never happen.");
}
}
else

MODIFY
WalletWasabi/CoinJoin/Client/Clients/CoinJoinClient.cs
WalletWasabi/CoinJoin/Client/Clients/CoinJoinClient.cs
@@ -518,7 +518,7 @@ namespace WalletWasabi.CoinJoin.Client.Clients
SmartCoin coin = State.GetSingleOrDefaultFromWaitingList(coinReference);
if (coin is null)
{
- throw new NotSupportedException("This is impossible.");
+ throw new NotSupportedException("This should never happen.");
}
coin.BannedUntilUtc = DateTimeOffset.UtcNow + TimeSpan.FromMinutes(minuteInt);
@@ -537,7 +537,7 @@ namespace WalletWasabi.CoinJoin.Client.Clients
SmartCoin coin = State.GetSingleOrDefaultFromWaitingList(coinReference);
if (coin is null)
{
- throw new NotSupportedException("This is impossible.");
+ throw new NotSupportedException("This should never happen.");
}
coin.SpentAccordingToBackend = true;
@@ -564,7 +564,7 @@ namespace WalletWasabi.CoinJoin.Client.Clients
var coin = State.GetSingleOrDefaultFromWaitingList(coinReference);
if (coin is null)
{
- throw new NotSupportedException("This is impossible.");
+ throw new NotSupportedException("This should never happen.");
}
coinsRegistered.Add(coin);
@@ -1080,7 +1080,7 @@ namespace WalletWasabi.CoinJoin.Client.Clients
SmartCoin coin = State.GetSingleOrDefaultFromWaitingList(coinReference);
if (coin is null)
{
- throw new NotSupportedException("This is impossible.");
+ throw new NotSupportedException("This should never happen.");
}
coin.Secret ??= KeyManager.GetSecrets(Kitchen.SaltSoup(), coin.ScriptPubKey).Single();

MODIFY
WalletWasabi/CoinJoin/Coordinator/Rounds/CoordinatorRound.cs
WalletWasabi/CoinJoin/Coordinator/Rounds/CoordinatorRound.cs
@@ -388,7 +388,7 @@ namespace WalletWasabi.CoinJoin.Coordinator.Rounds
break;
default:
- throw new InvalidOperationException("This is impossible.");
+ throw new InvalidOperationException("This should never happen.");
}
}
catch (Exception ex)
@@ -432,7 +432,7 @@ namespace WalletWasabi.CoinJoin.Coordinator.Rounds
break;
default:
- throw new InvalidOperationException("This is impossible.");
+ throw new InvalidOperationException("This should never happen.");
}
return timeout;
@@ -823,7 +823,7 @@ namespace WalletWasabi.CoinJoin.Coordinator.Rounds
if (optimalFeeRate is null || optimalFeeRate == FeeRate.Zero || currentFeeRate is null || currentFeeRate == FeeRate.Zero) // This would be really strange if it'd happen.
{
- Logger.LogError($"Round ({RoundId}): This is impossible. {nameof(optimalFeeRate)}: {optimalFeeRate}, {nameof(currentFeeRate)}: {currentFeeRate}.");
+ Logger.LogError($"Round ({RoundId}): This should never happen. {nameof(optimalFeeRate)}: {optimalFeeRate}, {nameof(currentFeeRate)}: {currentFeeRate}.");
}
else if (optimalFeeRate < currentFeeRate)
{

MODIFY
WalletWasabi/Gma/QrCodeNet/Encoding/Masking/PatternFactory.cs
WalletWasabi/Gma/QrCodeNet/Encoding/Masking/PatternFactory.cs
@@ -17,7 +17,7 @@ namespace Gma.QrCodeNet.Encoding.Masking
MaskPatternType.Type5 => new Pattern5(),
MaskPatternType.Type6 => new Pattern6(),
MaskPatternType.Type7 => new Pattern7(),
- _ => throw new NotSupportedException("This is impossible.")
+ _ => throw new NotSupportedException("This should never happen.")
};
}

MODIFY
WalletWasabi/Services/SingleInstanceChecker.cs
WalletWasabi/Services/SingleInstanceChecker.cs
@@ -118,7 +118,7 @@ namespace WalletWasabi.Services
var task = TaskStartTcpListener;
if (task is null)
{
- throw new InvalidOperationException("This is impossible!");
+ throw new InvalidOperationException("This should never happen!");
}
TcpListener? listener = null;

Adjust impossible exception messages