From: Owen R. <exo...@us...> - 2006-11-06 01:54:38
|
Update of /cvsroot/netreflector/NetReflector/src/NetReflector/util In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv12706/src/NetReflector/util Modified Files: ReflectorMember.cs Log Message: providing better exception information when attempting to set readonly properties -- contributed by Richard Foster Index: ReflectorMember.cs =================================================================== RCS file: /cvsroot/netreflector/NetReflector/src/NetReflector/util/ReflectorMember.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ReflectorMember.cs 3 Aug 2006 06:43:24 -0000 1.6 --- ReflectorMember.cs 6 Nov 2006 01:53:50 -0000 1.7 *************** *** 73,76 **** --- 73,81 ---- throw new NetReflectorException(msg, ex.InnerException); } + catch (ArgumentException) + { + string msg = string.Format(@"Unable to assign value ""{0}"" to member ""{1}"". No set method exists.", value, MemberName); + throw new NetReflectorException(msg); + } } |