
fast-member - issue #6
Nicer error message when ArgumentOutOfRangeException exceptions are thrown
If you change the code from
il.Emit(OpCodes.Ldstr, "name"); il.Emit(OpCodes.Newobj, typeof(ArgumentOutOfRangeException).GetConstructor(new Type[] { typeof(string) })); il.Emit(OpCodes.Throw);
To this:
il.Emit(OpCodes.Ldarg, 2); il.Emit(OpCodes.Newobj, typeof(ArgumentOutOfRangeException).GetConstructor(new Type[] { typeof(string) })); il.Emit(OpCodes.Throw);
It'll shown you the actual Argument name that is causing the issue, at the moment it just says the parameter name is "name"
This could be changed here http://code.google.com/p/fast-member/source/browse/FastMember/TypeAccessor.cs#113 and http://code.google.com/p/fast-member/source/browse/FastMember/TypeAccessor.cs#168 and
Comment #1
Posted on Aug 16, 2014 by Grumpy Horsesddh
Status: New
Labels:
Type-Defect
Priority-Medium