-
Notifications
You must be signed in to change notification settings - Fork 293
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
Geneva Exporter - Throw on TableNameMappings null
value
#322
Geneva Exporter - Throw on TableNameMappings null
value
#322
Conversation
@mic-max please address conflicts. |
@@ -64,6 +65,8 @@ public GenevaLogExporter(GenevaExporterOptions options) | |||
var tempTableMappings = new Dictionary<string, string>(options.TableNameMappings.Count, StringComparer.Ordinal); | |||
foreach (var kv in options.TableNameMappings) | |||
{ | |||
Guard.ThrowIfNull(kv.Value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend including the Key name in the exception message here to help users identify which value is null.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to do this validation in the GenevaExporterOptions
class, like how it's done for PrepopulatedFields
?
What should be done when a null key exists in the |
Codecov Report
@@ Coverage Diff @@
## main #322 +/- ##
==========================================
+ Coverage 24.09% 24.25% +0.16%
==========================================
Files 123 123
Lines 3690 3698 +8
==========================================
+ Hits 889 897 +8
Misses 2801 2801
|
Throw exception when null value is used in
TableNameMappings
for Geneva Exporter Options class.Includes unit test.