Skip to content

Commit

Permalink
Merge branch 'support/8.0.x' into release/8.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rjmurillo committed Jul 26, 2017
2 parents 89fcb17 + d5e1365 commit dc4bc9d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/Qwiq.Mapper/Attributes/AttributeMapperStrategy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,18 @@ protected internal virtual void MapImpl(Type targetWorkItemType, IWorkItem sourc
var fieldName = a.FieldName;
var convert = a.RequireConversion;
var nullSub = a.NullSubstitute;
var fieldValue = sourceWorkItem[fieldName];
object fieldValue;
try
{
fieldValue = sourceWorkItem[fieldName];
}
catch (DeniedOrNotExistException e)
{
var tm = new TypePair(sourceWorkItem, targetWorkItemType);
var pm = new PropertyMap(property, fieldName);
var message = $"Unable to get field value on {sourceWorkItem.Id}.";
throw new AttributeMapException(message, e, tm, pm);
}

AssignFieldValue(targetWorkItemType, sourceWorkItem, targetWorkItem, property, fieldName, convert, nullSub, fieldValue);
}
Expand Down

0 comments on commit dc4bc9d

Please sign in to comment.