Browse Source

Backport proper exception handling in win32 system dialogs

pull/8699/head
Max Katz 4 years ago
committed by GitHub
parent
commit
2d2cd97b55
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/Windows/Avalonia.Win32/SystemDialogImpl.cs

6
src/Windows/Avalonia.Win32/SystemDialogImpl.cs

@ -117,7 +117,8 @@ namespace Avalonia.Win32
}
catch (COMException ex)
{
throw new Win32Exception(ex.HResult);
var message = new Win32Exception(ex.HResult).Message;
throw new COMException(message, ex);
}
})!;
}
@ -176,7 +177,8 @@ namespace Avalonia.Win32
}
catch (COMException ex)
{
throw new Win32Exception(ex.HResult);
var message = new Win32Exception(ex.HResult).Message;
throw new COMException(message, ex);
}
});
}

Loading…
Cancel
Save