Skip to content

Commit

Permalink
Fix exception message names
Browse files Browse the repository at this point in the history
  • Loading branch information
khellang committed Sep 1, 2023
1 parent d5b0842 commit feaa072
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Scrutor/ClosedTypeDecorationStrategy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ public ClosedTypeDecorationStrategy(Type serviceType, Type? decoratorType, Func<
return FactoryDecorator(serviceType, serviceKey, DecoratorFactory);
}

throw new InvalidOperationException($"Both serviceType and decoratorFactory can not be null.");
throw new InvalidOperationException($"Both {nameof(DecoratorType)} and {nameof(DecoratorFactory)} can not be null.");

Check warning on line 31 in src/Scrutor/ClosedTypeDecorationStrategy.cs

View check run for this annotation

Codecov / codecov/patch

src/Scrutor/ClosedTypeDecorationStrategy.cs#L31

Added line #L31 was not covered by tests
}
}
2 changes: 1 addition & 1 deletion src/Scrutor/OpenGenericDecorationStrategy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ public OpenGenericDecorationStrategy(Type serviceType, Type? decoratorType, Func
return FactoryDecorator(serviceType, serviceKey, DecoratorFactory);
}

throw new InvalidOperationException($"Both serviceType and decoratorFactory can not be null.");
throw new InvalidOperationException($"Both {nameof(DecoratorType)} and {nameof(DecoratorFactory)} can not be null.");

Check warning on line 38 in src/Scrutor/OpenGenericDecorationStrategy.cs

View check run for this annotation

Codecov / codecov/patch

src/Scrutor/OpenGenericDecorationStrategy.cs#L38

Added line #L38 was not covered by tests
}
}

0 comments on commit feaa072

Please sign in to comment.