dotnet / dotnet-api-docs

.NET API reference documentation (.NET 5+, .NET Core, .NET Framework)
https://docs.microsoft.com/dotnet/api/
Other
719 stars 1.56k forks source link

Stream.Read(Span<byte>) and Stream.Write(ReadOnlySpan<byte>) are missing exception documentation #9315

Open carlreinke opened 1 year ago

carlreinke commented 1 year ago

There are no exceptions documented for Stream.Read(Span<byte>) or Stream.Write(ReadOnlySpan<byte>). These methods can throw IOException, NotSupportedException, and ObjectDisposedException.

https://github.com/dotnet/dotnet-api-docs/blob/1fc705651a652eda664835c7c2a4985461d308b0/xml/System.IO/Stream.xml#L1953-L2009

https://github.com/dotnet/dotnet-api-docs/blob/1fc705651a652eda664835c7c2a4985461d308b0/xml/System.IO/Stream.xml#L3115-L3168

Likewise, BinaryWriter.Write(ReadOnlySpan<byte>).

https://github.com/dotnet/dotnet-api-docs/blob/1fc705651a652eda664835c7c2a4985461d308b0/xml/System.IO/BinaryWriter.xml#L1836-L1883

ghost commented 1 year ago

Tagging subscribers to this area: @dotnet/area-system-io See info in area-owners.md if you want to be subscribed.

Issue Details
There are no exceptions documented for `Stream.Read(Span)` or `Stream.Write(ReadOnlySpan)`. These methods can throw `IOException`, `NotSupportedException`, and `ObjectDisposedException`. https://github.com/dotnet/dotnet-api-docs/blob/1fc705651a652eda664835c7c2a4985461d308b0/xml/System.IO/Stream.xml#L1953-L2009 https://github.com/dotnet/dotnet-api-docs/blob/1fc705651a652eda664835c7c2a4985461d308b0/xml/System.IO/Stream.xml#L3115-L3168 Likewise, `BinaryWriter.Write(ReadOnlySpan)`. https://github.com/dotnet/dotnet-api-docs/blob/1fc705651a652eda664835c7c2a4985461d308b0/xml/System.IO/BinaryWriter.xml#L1836-L1883
Author: carlreinke
Assignees: -
Labels: `untriaged`, `Pri3`, `area-System.IO`
Milestone: -