Browse Source
Backport proper exception handling in win32 system dialogs
pull/8699/head
Max Katz
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
2 deletions
-
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); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|