exception when file not found
MODIFY
WalletWasabi.Fluent/Helpers/FileHelpers.cs
WalletWasabi.Fluent/Helpers/FileHelpers.cs
@@ -12,8 +12,11 @@ namespace WalletWasabi.Fluent.Helpers
{
public static async Task OpenFileInTextEditorAsync(string filePath)
{
- if (File.Exists(filePath))
+ if (!File.Exists(filePath))
{
+ throw new FileNotFoundException("File not found.");
+ }
+
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
// If no associated application/json MimeType is found xdg-open opens retrun error
@@ -59,10 +62,5 @@ namespace WalletWasabi.Fluent.Helpers
});
}
}
- else
- {
- NotificationHelpers.Error("File not found.");
- }
- }
}
}

exception when file not found