Skip to content

Commit

Permalink
Fixed a bug where all server-side thrown exceptions were translated t…
Browse files Browse the repository at this point in the history
…o client as TargetInvocationException
  • Loading branch information
ivan-danilov committed Sep 27, 2015
1 parent 33c1d17 commit e41ebb0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion ManagedUiaCustomizationCore/Schema/UiaMethodInfoHelper.cs
Expand Up @@ -161,7 +161,17 @@ public void DispatchCallToProvider(object provider, UiaParameterListHelper param
}

// call provider
object result = ProviderMethodInfo.Invoke(provider, providerCallParameters);
object result = null;
try
{
result = ProviderMethodInfo.Invoke(provider, providerCallParameters);
}
catch (TargetInvocationException e)
{
if (e.InnerException != null)
throw e.InnerException;
throw;
}

// write back out params
for (int i = 0; i < PatternMethodParamDescriptions.Count; i++)
Expand Down

0 comments on commit e41ebb0

Please sign in to comment.