Skip to content

A null parameter should throw ArgumentNullException #1

@tsahi

Description

@tsahi

at

throw new NullReferenceException($"{nameof(keyVaultClient)} is null!");
A NullReferenceException is thrown. In this case, an ArgumentNullException should be thrown. The parameter name should be set to the paramName pareameter of the ArgumentNullException constructor.

Similarly, at

throw new NullReferenceException($"Key Vault request {typeof(T).Name} for \"{name}\" returned null!");
A NullReferenceException is thrown although some other, perhaps a custom application exception, should be thrown.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions