Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exceptions thrown by UIA server in UI thread in WPF should be caught …
…and redirected to automating thread in order to report error correctly. Otherwise automated app just crashes as with usual uncaught exception in dispatcher. On UIA client side added UiaCallFailedException because otherwise it is TargetInvocationException without any details, which is very common.
- Loading branch information
1 parent
37039b7
commit 33c1d17
Showing
4 changed files
with
76 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System; | ||
using System.Runtime.Serialization; | ||
|
||
namespace ManagedUiaCustomizationCore | ||
{ | ||
[Serializable] | ||
public class UiaCallFailedException : Exception | ||
{ | ||
public UiaCallFailedException() | ||
{ | ||
} | ||
|
||
public UiaCallFailedException(string message) : base(message) | ||
{ | ||
} | ||
|
||
public UiaCallFailedException(string message, Exception inner) : base(message, inner) | ||
{ | ||
} | ||
|
||
protected UiaCallFailedException( | ||
SerializationInfo info, | ||
StreamingContext context) : base(info, context) | ||
{ | ||
} | ||
} | ||
} |