Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow mock resolution to continue when exception thrown #403

Merged
merged 2 commits into from
Jul 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion JotunnLib/Managers/MockSystem/FieldMember.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ public FieldMember(FieldInfo fieldInfo)

public override object GetValue(object obj)
{
return fieldInfo.GetValue(obj);
try
{
return fieldInfo.GetValue(obj);
}
catch
{
return null;
}
}

public override void SetValue(object obj, object value)
Expand Down
9 changes: 8 additions & 1 deletion JotunnLib/Managers/MockSystem/PropertyMember.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ public PropertyMember(PropertyInfo propertyInfo)

public override object GetValue(object obj)
{
return propertyInfo.GetValue(obj);
try
{
return propertyInfo.GetValue(obj);
}
catch
{
return null;
}
}

public override void SetValue(object obj, object value)
Expand Down
Loading