Skip to content

Commit

Permalink
Throw ArgumentException instead of Exception which must not be thrown…
Browse files Browse the repository at this point in the history
… manually
  • Loading branch information
lg2de authored and dennisdoomen committed Nov 20, 2022
1 parent 9569a48 commit 27326cb
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -143,7 +143,7 @@ private static MemberInfo GetMemberAccessTargetMember(Expression expression)
return memberExpression.Member;
}

throw new Exception("Expression must be a simple member access");
throw new ArgumentException("Expression must be a simple member access", nameof(expression));
}

private static Expression<Func<IMemberInfo, bool>> BuildMemberSelectionPredicate(Type relatedSubjectType, MemberInfo referencedMember)
Expand Down

0 comments on commit 27326cb

Please sign in to comment.