File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -98,11 +98,11 @@ private static IEnumerable<Error> SetValue<T>(this SpecificationProperty specPro
9898 }
9999 catch ( TargetInvocationException e )
100100 {
101- return new [ ] { new SetValueExceptionError ( specProp . Specification . FromSpecification ( ) , e . InnerException ) } ;
101+ return new [ ] { new SetValueExceptionError ( specProp . Specification . FromSpecification ( ) , e . InnerException , value ) } ;
102102 }
103103 catch ( Exception e )
104104 {
105- return new [ ] { new SetValueExceptionError ( specProp . Specification . FromSpecification ( ) , e ) } ;
105+ return new [ ] { new SetValueExceptionError ( specProp . Specification . FromSpecification ( ) , e , value ) } ;
106106 }
107107 }
108108
Original file line number Diff line number Diff line change @@ -479,14 +479,16 @@ internal VersionRequestedError()
479479 /// <summary>
480480 /// Models as error generated when exception is thrown at Property.SetValue
481481 /// </summary>
482- public sealed class SetValueExceptionError : Error
482+ public sealed class SetValueExceptionError : NamedError
483483 {
484484 private readonly Exception exception ;
485+ private readonly object value ;
485486
486- internal SetValueExceptionError ( Exception exception )
487- : base ( ErrorType . SetValueExceptionError )
487+ internal SetValueExceptionError ( NameInfo nameInfo , Exception exception , object value )
488+ : base ( ErrorType . SetValueExceptionError , nameInfo )
488489 {
489490 this . exception = exception ;
491+ this . value = value ;
490492 }
491493
492494 /// <summary>
@@ -496,5 +498,14 @@ public Exception Exception
496498 {
497499 get { return exception ; }
498500 }
501+
502+ /// <summary>
503+ /// The value that had to be set to the property
504+ /// </summary>
505+ public object Value
506+ {
507+ get { return value ; }
508+ }
509+
499510 }
500511}
You can’t perform that action at this time.
0 commit comments