Replace Requires.NotNullOrEmpty(string) with ArgumentException.ThrowIfNullOrEmpty#19197
Conversation
|
@daxian-dbw Please mark |
|
PowerShell-CI-macos (Test for macOS mac Test - UnelevatedPesterTests - Others test failure: #19198 |
|
I think this change is fine. But you need to rebase with the master, because #19133 introduces another use of the |
375a8c8 to
f16cb79
Compare
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
|
🎉 Handy links: |
Breaking change: Bucket 3: Unlikely Grey Area
This PR makes changes to public APIs so that an
ArgumentExceptionis thrown instead ofArgumentNullExceptionwhen a string is empty rather than null.If a consumer caught the
ArgumentNullExceptionand not the base classArgumentExceptionthis is a change in behavior.However, it seems unlikely to depend on a specific exception being thrown, because if specific behavior was required, the caller could have implemented the necessary business logic.