* RealProxy.cs: Report invalid return type of values using
InvalidCastException, like MS.NET. Fixes bug #75203.
svn path=/trunk/mcs/; revision=45876
+2005-06-13 Lluis Sanchez Gual <lluis@novell.com>
+
+ * RealProxy.cs: Report invalid return type of values using
+ InvalidCastException, like MS.NET. Fixes bug #75203.
+
2004-10-26 Lluis Sanchez Gual <lluis@novell.com>
* RealProxy.cs: Added _targetDomainId and _targetUri fields, which are
MethodInfo mi = (MethodInfo) call.MethodBase;
if (mrm.ReturnValue != null && !mi.ReturnType.IsInstanceOfType (mrm.ReturnValue))
- throw new RemotingException ("Return value has an invalid type");
+ throw new InvalidCastException ("Return value has an invalid type");
// Check out parameters
object outArg = mrm.GetOutArg (nout++);
if (outArg != null && !par.ParameterType.IsInstanceOfType (outArg))
{
- throw new RemotingException ("Return argument '" + par.Name + "' has an invalid type");
+ throw new InvalidCastException ("Return argument '" + par.Name + "' has an invalid type");
}
outArgs [narg++] = outArg;
}