Comments (4)
Hi Jasper,
The exception being documented is the main point, not the arguments being checked. Regardless of which parameter is null, the exception thrown is the same, thus the check passes (the exception is documented).
In this particular case, the message could be manually edited to reflect both parameters that are checked.
Do you agree?
from exceptionalresharper.
Hi Pedro
I agree that the exception could be manually edited. But that partly defeat the purpose of autogenerating documentation. I still think that the documentation must in this case contain which parameters that can throw an ArgumentNullException, because this also shows which doesn't.
from exceptionalresharper.
I understand your point.
So something like this would be ok for you?
/// <exception cref="ArgumentNullException">
/// <paramref name="fileData"/> is <see langword="null" /> or
/// <paramref name="fileName"/> is <see langword="null" />.
/// </exception>
public Guid Import(Stream fileData, string fileName, Guid? cachedFileId)
{
if (fileData == null) throw new ArgumentNullException("fileData");
if (fileName == null) throw new ArgumentNullException("fileName");
}
from exceptionalresharper.
Yes that is how i would write it except that Microsoft writes it like this "-or-" in their documentation.
from exceptionalresharper.
Related Issues (20)
- Full Guide for manual installation? HOT 8
- Optional exceptions not working HOT 7
- Options in General page are not saved in Visual Studio 2019 HOT 1
- SDK Update to Resharper 2020.2.x HOT 5
- Do not show AsyncConverter.AsyncWait error on finished tasks
- Ignores checked keyword
- Private protected methods ignored
- Inheritdoc with exception bug
- Change exceptional documentation style
- NullReferenceException - Object reference not set to an instance of an object.
- Change format of exception comment (specifically the type)
- 2019.1 Support? HOT 3
- Save problem with Checkboxes in Options HOT 3
- Exceptional not available in Extension Manager HOT 2
- 2019.2.x Support? HOT 14
- New Maintainer? HOT 5
- Autofixes for optional exceptions
- Exclude whole assemblies HOT 3
- 2019.3.x Support? HOT 3
- Nightly Build HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from exceptionalresharper.