Refactor IMediaImage.Open to return error status instead of boolean.

This commit is contained in:
2021-09-16 19:10:39 +01:00
parent ac275aa8cb
commit ef2fc1788a
86 changed files with 699 additions and 512 deletions

View File

@@ -537,9 +537,11 @@ namespace Aaru.Gui.ViewModels.Windows
try
{
if(!imageFormat.Open(inputFilter))
ErrorNumber opened = imageFormat.Open(inputFilter);
if(opened != ErrorNumber.NoError)
{
MessageBoxManager.GetMessageBoxStandardWindow("Error", "Unable to open image format.",
MessageBoxManager.GetMessageBoxStandardWindow("Error", $"Error {opened} opening image format.",
ButtonEnum.Ok, Icon.Error);
AaruConsole.ErrorWriteLine("Unable to open image format");