13 types derived from IOException
Microsoft.AspNetCore.Connections.Abstractions (1)
Exceptions\ConnectionResetException.cs (1)
12public class ConnectionResetException : IOException
Microsoft.AspNetCore.Http.Abstractions (1)
BadHttpRequestException.cs (1)
9public class BadHttpRequestException : IOException
System.IO.Compression (1)
System\IO\Compression\DeflateZLib\ZLibException.cs (1)
14public class ZLibException : IOException, ISerializable
System.IO.FileSystem.DriveInfo (1)
System\IO\DriveNotFoundException.cs (1)
12public class DriveNotFoundException : IOException
System.Net.Http (2)
System\Net\Http\HttpIOException.cs (1)
11public class HttpIOException : IOException
System\Net\Http\SocketsHttpHandler\SocksException.cs (1)
8internal sealed class SocksException : IOException
System.Net.Quic (1)
System\Net\Quic\QuicException.cs (1)
11public sealed class QuicException : IOException
System.Private.CoreLib (5)
src\libraries\System.Private.CoreLib\src\System\IO\DirectoryNotFoundException.cs (1)
18public class DirectoryNotFoundException : IOException
src\libraries\System.Private.CoreLib\src\System\IO\EndOfStreamException.cs (1)
12public class EndOfStreamException : IOException
src\libraries\System.Private.CoreLib\src\System\IO\FileLoadException.cs (1)
12public partial class FileLoadException : IOException
src\libraries\System.Private.CoreLib\src\System\IO\FileNotFoundException.cs (1)
14public partial class FileNotFoundException : IOException
src\libraries\System.Private.CoreLib\src\System\IO\PathTooLongException.cs (1)
12public class PathTooLongException : IOException
System.ServiceModel.NetNamedPipe (1)
System\IO\PipeException.cs (1)
9public class PipeException : IOException
406 instantiations of IOException
ClientSample (2)
Tcp\TcpConnection.cs (2)
144error = new IOException(ex.Message, ex); 205error = new IOException(ex.Message, ex);
dotnet-svcutil-lib (2)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\StreamFormatter.cs (1)
288throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new IOException(SRServiceModel.SFxStreamIOException, ex));
Metadata\MetadataDocumentSaver.cs (1)
74throw new IOException(string.Format(CultureInfo.CurrentCulture, MetadataResources.ErrFileAlreadyExistsFormat, fileInfo.FilePath));
http2cat (1)
src\Shared\Http2cat\Http2Utilities.cs (1)
861throw new IOException("The reader completed without returning a frame.");
IIS.Common.TestLib (1)
TestConnections.cs (1)
233tcs.SetException(new IOException(
IIS.FunctionalTests (1)
src\Shared\Http2cat\Http2Utilities.cs (1)
861throw new IOException("The reader completed without returning a frame.");
IIS.LongTests (1)
src\Shared\Http2cat\Http2Utilities.cs (1)
861throw new IOException("The reader completed without returning a frame.");
IIS.NewHandler.FunctionalTests (1)
src\Shared\Http2cat\Http2Utilities.cs (1)
861throw new IOException("The reader completed without returning a frame.");
IIS.NewShim.FunctionalTests (1)
src\Shared\Http2cat\Http2Utilities.cs (1)
861throw new IOException("The reader completed without returning a frame.");
IISExpress.FunctionalTests (1)
src\Shared\Http2cat\Http2Utilities.cs (1)
861throw new IOException("The reader completed without returning a frame.");
InMemory.FunctionalTests (6)
Http2\Http2ConnectionTests.cs (1)
5318var ioException = new IOException();
Http2\Http2TestBase.cs (1)
1255throw new IOException("The reader completed without returning a frame.");
Http2\TlsTests.cs (1)
128throw new IOException("The reader completed without returning a frame.");
RequestTests.cs (1)
1175throw new IOException("Unexpected end of content.");
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (1)
593throw new IOException("The reader completed without returning a frame.");
src\Servers\Kestrel\shared\test\StreamBackedTestConnection.cs (1)
145throw new IOException(
Microsoft.AspNetCore.Antiforgery.Test (1)
DefaultAntiforgeryTokenStoreTest.cs (1)
296var ioException = new IOException();
Microsoft.AspNetCore.Components.Endpoints (1)
FormMapping\BrowserFileFromFormFile.cs (1)
24throw new IOException($"Supplied file with size {Size} bytes exceeds the maximum of {maxAllowedSize} bytes.");
Microsoft.AspNetCore.Components.Web (1)
Forms\InputFile\BrowserFile.cs (1)
40throw new IOException($"Supplied file with size {Size} bytes exceeds the maximum of {maxAllowedSize} bytes.");
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
TargetPickerUi.cs (1)
72throw new IOException($"Protocol error: did not get the expected length preceding a message, " +
Microsoft.AspNetCore.Http.Connections.Tests (1)
HttpConnectionDispatcherTests.cs (1)
894mockStream.Setup(m => m.CopyToAsync(It.IsAny<Stream>(), It.IsAny<int>(), It.IsAny<CancellationToken>())).Throws(new IOException());
Microsoft.AspNetCore.Http.Extensions.Tests (2)
RequestDelegateGenerator\RequestDelegateCreationTests.Forms.cs (1)
927var ioException = new IOException();
RequestDelegateGenerator\RequestDelegateCreationTests.Logging.cs (1)
478var ioException = new IOException();
Microsoft.AspNetCore.HttpLogging.Tests (3)
HttpLoggingMiddlewareTests.cs (3)
892throw new IOException("Test exception"); 917throw new IOException("Test exception"); 1583throw new IOException("Test exception");
Microsoft.AspNetCore.Mvc.Core.Test (10)
ModelBinding\Binders\BodyModelBinderTests.cs (7)
521throw new IOException("Unable to read input stream!!"); 787throw new IOException("Unable to read input stream!!"); 809throw new IOException("Unable to read input stream!!"); 831throw new IOException("Unable to read input stream!!"); 857throw new IOException("Unable to read input stream!!"); 879throw new IOException("Unable to read input stream!!"); 899throw new IOException("Unable to read input stream!!");
ModelBinding\FormFileValueProviderFactoryTest.cs (1)
78var exception = new IOException();
ModelBinding\FormValueProviderFactoryTest.cs (1)
66var exception = new IOException();
ModelBinding\JQueryFormValueProviderFactoryTest.cs (1)
151var exception = new IOException();
Microsoft.AspNetCore.Server.HttpSys (8)
RequestProcessing\RequestStream.cs (2)
158Exception exception = new IOException(string.Empty, new HttpSysException((int)statusCode)); 279Exception exception = new IOException(string.Empty, new HttpSysException((int)statusCode));
RequestProcessing\RequestStreamAsyncResult.cs (2)
79asyncResult.Fail(new IOException(string.Empty, new HttpSysException((int)errorCode))); 89asyncResult.Fail(new IOException(string.Empty, e));
RequestProcessing\ResponseBody.cs (3)
176var exception = new IOException(string.Empty, new HttpSysException((int)statusCode)); 392Exception exception = new IOException(string.Empty, new HttpSysException((int)statusCode)); 715var exception = new IOException(string.Empty, new HttpSysException((int)statusCode));
RequestProcessing\ResponseStreamAsyncResult.cs (1)
245var exception = new IOException(string.Empty, new HttpSysException((int)errorCode));
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
src\Shared\Http2cat\Http2Utilities.cs (1)
861throw new IOException("The reader completed without returning a frame.");
Microsoft.AspNetCore.Server.Kestrel.Core (8)
Internal\AddressBinder.cs (1)
94throw new IOException(CoreStrings.FormatEndpointAlreadyInUse(endpoint), ex);
Internal\Http\Http1ChunkedEncodingMessageBody.cs (1)
497throw new IOException(CoreStrings.BadRequest_BadChunkSizeData, ex);
Internal\Http2\Http2Connection.cs (2)
348AbortStream(_incomingFrame.StreamId, new IOException(ex.Message, ex)); 457stream.Abort(new IOException(CoreStrings.Http2StreamAborted, connectionError));
Internal\Http2\Http2Stream.cs (1)
566Abort(new IOException(CoreStrings.HttpStreamResetByClient));
Internal\Http3\Http3Stream.cs (2)
604stream.AbortCore(new IOException(CoreStrings.HttpStreamResetByClient), (Http3ErrorCode)errorCode); 672AbortCore(new IOException(CoreStrings.HttpStreamResetByClient, ex), (Http3ErrorCode)resolvedErrorCode);
LocalhostListenOptions.cs (1)
63throw new IOException(CoreStrings.FormatAddressBindingFailed(GetDisplayName()), new AggregateException(exceptions));
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
src\Servers\Kestrel\shared\test\StreamBackedTestConnection.cs (1)
145throw new IOException(
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (2)
Http2\Http2ConnectionBenchmarkBase.cs (1)
175throw new IOException("The reader completed without returning a frame.");
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (1)
593throw new IOException("The reader completed without returning a frame.");
Microsoft.AspNetCore.SignalR.Client.Core (1)
HubConnection.cs (1)
1504var ex = new IOException("The server disconnected before the handshake could be started.");
Microsoft.AspNetCore.SignalR.Core (2)
DefaultHubLifetimeManager.cs (2)
342throw new IOException($"Connection '{connectionId}' does not exist."); 377throw new IOException($"Connection '{connectionId}' disconnected.");
Microsoft.AspNetCore.SignalR.StackExchangeRedis (2)
RedisHubLifetimeManager.cs (2)
403throw new IOException($"Connection '{connectionId}' does not exist."); 430throw new IOException($"Connection '{connectionId}' disconnected.");
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (1)
RedisEndToEnd.cs (1)
387_receiveTcs.TrySetException(new IOException("force reconnect"));
Microsoft.AspNetCore.TestHost (6)
HttpContextBuilder.cs (1)
180_responseReaderStream.Abort(new IOException("The client aborted the request."));
ResponseBodyPipeWriter.cs (2)
47_pipe.Writer.Complete(new IOException(string.Empty, innerException)); 66throw new IOException("The request was aborted or the pipeline has finished.");
ResponseBodyReaderStream.cs (1)
133throw new IOException(string.Empty, _abortException);
TestWebSocket.cs (2)
286throw new IOException("The remote end closed the connection.", new ObjectDisposedException(typeof(TestWebSocket).FullName)); 336throw new IOException("The remote end closed the connection.", new ObjectDisposedException(typeof(TestWebSocket).FullName));
Microsoft.AspNetCore.WebSockets.Tests (1)
BufferStream.cs (1)
321throw new IOException(string.Empty, _abortException);
Microsoft.AspNetCore.WebUtilities (6)
FileBufferingReadStream.cs (2)
271throw new IOException("Buffer limit exceeded."); 348throw new IOException("Buffer limit exceeded.");
FileBufferingWriteStream.cs (2)
115throw new IOException("Buffer limit exceeded."); 154throw new IOException("Buffer limit exceeded.");
MultipartReaderStream.cs (2)
176throw new IOException("Unexpected end of Stream, the content may have already been read by another component. "); 256throw new IOException("Unexpected end of Stream, the content may have already been read by another component. ");
Microsoft.AspNetCore.WebUtilities.Tests (2)
HttpResponseStreamWriterTest.cs (2)
821throw new IOException("Test IOException"); 834throw new IOException("Test IOException");
Microsoft.Build (4)
CommunicationsUtilities.cs (2)
565throw new IOException(String.Format(CultureInfo.InvariantCulture, "Unexpected end of stream while reading for handshake")); 584throw new IOException(String.Format(CultureInfo.InvariantCulture, "Failed to convert the handshake to big-endian. {0}", ex.Message));
InterningBinaryReader.cs (1)
95throw new IOException();
TempFileUtilities.cs (1)
199throw new IOException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("Shared.FailedCreatingTempFile", ex.Message), ex);
Microsoft.Build.Engine.OM.UnitTests (1)
TempFileUtilities.cs (1)
199throw new IOException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("Shared.FailedCreatingTempFile", ex.Message), ex);
Microsoft.Build.Tasks.Core (3)
InterningBinaryReader.cs (1)
95throw new IOException();
NativeMethods.cs (1)
860throw new IOException("Moving target is read-only");
TempFileUtilities.cs (1)
199throw new IOException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("Shared.FailedCreatingTempFile", ex.Message), ex);
Microsoft.Build.Tasks.UnitTests (2)
Copy_Tests.cs (1)
3077throw new IOException("oops");
Touch_Tests.cs (1)
153throw new IOException();
Microsoft.Build.Utilities.Core (1)
TempFileUtilities.cs (1)
199throw new IOException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("Shared.FailedCreatingTempFile", ex.Message), ex);
Microsoft.Build.Utilities.UnitTests (1)
TaskLoggingHelper_Tests.cs (1)
299new IOException("An I/O error occurred"));
Microsoft.CodeAnalysis (17)
EmbeddedText.cs (1)
222throw new IOException(CodeAnalysisResources.StreamIsTooLong);
FileSystem\FileUtilities.cs (10)
258throw new IOException(e.Message, e); 262throw new IOException(e.Message, e); 266throw new IOException(e.Message, e); 306throw new IOException(e.Message, e); 330throw new IOException(e.Message, e); 347throw new IOException(e.Message, e); 389throw new IOException(e.Message, e); 407throw new IOException(e.Message, e); 426throw new IOException(e.Message, e); 451throw new IOException(e.Message, e);
FileSystem\ICommonCompilerFileSystem.cs (1)
48throw new IOException(e.Message, e);
StrongName\DesktopStrongNameProvider.cs (3)
158throw new IOException(ex.Message); 239throw new IOException(ex.Message, ex); 261throw new IOException(ex.Message, ex);
StrongName\StrongNameKeys.cs (1)
155throw new IOException(CodeAnalysisResources.InvalidPublicKey);
Text\SourceText.cs (1)
1298throw new IOException(CodeAnalysisResources.StreamIsTooLong);
Microsoft.CodeAnalysis.CodeStyle (10)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (10)
258throw new IOException(e.Message, e); 262throw new IOException(e.Message, e); 266throw new IOException(e.Message, e); 306throw new IOException(e.Message, e); 330throw new IOException(e.Message, e); 347throw new IOException(e.Message, e); 389throw new IOException(e.Message, e); 407throw new IOException(e.Message, e); 426throw new IOException(e.Message, e); 451throw new IOException(e.Message, e);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (7)
CommandLineTests.cs (7)
8998dispose: () => { throw new IOException("Fake IOException"); }); 9021dispose: () => { throw new IOException("Fake IOException"); }); 9043dispose: () => { throw new IOException("Fake IOException"); }); 9073dispose: () => { throw new IOException("Fake IOException"); }); 9094throw new IOException(); 9120throw new IOException(); 9145throw new IOException();
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
Emit\CompilationEmitTests.cs (1)
5218var ioExceptionMessage = new IOException().Message;
Microsoft.CodeAnalysis.Features (1)
Emit\CompilationOutputFilesWithImplicitPdbPath.cs (1)
97throw new IOException(e.Message, e);
Microsoft.CodeAnalysis.Features.UnitTests (2)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (2)
587throw new IOException("Error"); 3747OpenAssemblyStreamImpl = () => throw new IOException("*message*"),
Microsoft.CodeAnalysis.InteractiveHost (10)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (10)
258throw new IOException(e.Message, e); 262throw new IOException(e.Message, e); 266throw new IOException(e.Message, e); 306throw new IOException(e.Message, e); 330throw new IOException(e.Message, e); 347throw new IOException(e.Message, e); 389throw new IOException(e.Message, e); 407throw new IOException(e.Message, e); 426throw new IOException(e.Message, e); 451throw new IOException(e.Message, e);
Microsoft.CodeAnalysis.Test.Utilities (5)
Compilation\ThrowingStrongNameFileSystem.cs (2)
20internal override bool FileExists(string fullPath) => throw new IOException(); 22internal override byte[] ReadAllBytes(string fullPath) => throw new IOException();
Mocks\TestSourceReferenceResolver.cs (1)
56throw new IOException();
Pe\BrokenStream.cs (2)
82ThrownException = new IOException(); 91ThrownException = new IOException();
Microsoft.CodeAnalysis.UnitTests (4)
EmbeddedTextTests.cs (1)
301throw new IOException();
InternalUtilities\StreamExtensionsTests.cs (3)
48var stream = new TestStream(readFunc: (_1, _2, _3) => { throw new IOException(); }); 78throw new IOException(); 104throw new IOException();
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (4)
CommandLineTests.vb (4)
9586Return New TestStream(backingStream:=New MemoryStream(), dispose:=Sub() Throw New IOException("Fake IOException")) 9606Return New TestStream(backingStream:=New MemoryStream(), dispose:=Sub() Throw New IOException("Fake IOException")) 9625Return New TestStream(backingStream:=New MemoryStream(), dispose:=Sub() Throw New IOException("Fake IOException")) 9654dispose:=Sub() Throw New IOException("Fake IOException"))
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
Attributes\EmitTestStrongNameProvider.vb (1)
22Dim thrownException = New IOException("This is a test IOException")
Microsoft.CodeAnalysis.Workspaces (11)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (10)
258throw new IOException(e.Message, e); 262throw new IOException(e.Message, e); 266throw new IOException(e.Message, e); 306throw new IOException(e.Message, e); 330throw new IOException(e.Message, e); 347throw new IOException(e.Message, e); 389throw new IOException(e.Message, e); 407throw new IOException(e.Message, e); 426throw new IOException(e.Message, e); 451throw new IOException(e.Message, e);
Workspace\Solution\FileTextLoader.cs (1)
224throw new IOException(message);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (10)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (10)
258throw new IOException(e.Message, e); 262throw new IOException(e.Message, e); 266throw new IOException(e.Message, e); 306throw new IOException(e.Message, e); 330throw new IOException(e.Message, e); 347throw new IOException(e.Message, e); 389throw new IOException(e.Message, e); 407throw new IOException(e.Message, e); 426throw new IOException(e.Message, e); 451throw new IOException(e.Message, e);
Microsoft.DotNet.Build.Tasks.Workloads (1)
EmbeddedTemplates.cs (1)
56throw new IOException(string.Format(Strings.TemplateResourceNotFound, resourceName));
Microsoft.DotNet.XliffTasks (1)
ExponentialRetry.cs (1)
28throw new IOException($"Retry failed after {count} times", e);
Microsoft.Extensions.Caching.Hybrid.Tests (1)
UnreliableL2Tests.cs (1)
182private static void Throw() => throw new IOException("L2 offline");
Microsoft.Extensions.ML (1)
ModelLoaders\FileModelLoader.cs (1)
136throw new IOException($"Model file {_filePath} still got locked after 5 seconds, fail to reload.");
Microsoft.ML.Core (10)
Utilities\Contracts.cs (10)
394=> Process(new IOException()); 396=> Process(new IOException(), ctx); 398=> Process(new IOException(msg)); 400=> Process(new IOException(msg), ctx); 402=> Process(new IOException(GetMsg(msg, args))); 404=> Process(new IOException(GetMsg(msg, args)), ctx); 406=> Process(new IOException(msg, inner)); 408=> Process(new IOException(msg, inner), ctx); 410=> Process(new IOException(GetMsg(msg, args), inner)); 412=> Process(new IOException(GetMsg(msg, args), inner), ctx);
Microsoft.ML.CpuMath (10)
src\Microsoft.ML.Core\Utilities\Contracts.cs (10)
394=> Process(new IOException()); 396=> Process(new IOException(), ctx); 398=> Process(new IOException(msg)); 400=> Process(new IOException(msg), ctx); 402=> Process(new IOException(GetMsg(msg, args))); 404=> Process(new IOException(GetMsg(msg, args)), ctx); 406=> Process(new IOException(msg, inner)); 408=> Process(new IOException(msg, inner), ctx); 410=> Process(new IOException(GetMsg(msg, args), inner)); 412=> Process(new IOException(GetMsg(msg, args), inner), ctx);
Microsoft.ML.ImageAnalytics (1)
ImageLoader.cs (1)
306throw new IOException($"File {path} too big to open.");
Microsoft.ML.Tokenizers (2)
Model\CodeGenTokenizer.cs (1)
1796throw new IOException($"Cannot read the file Merge file.{Environment.NewLine}Error message: {e.Message}", e);
Model\EnglishRobertaTokenizer.cs (1)
228throw new IOException($"Cannot read the file Merge file.{Environment.NewLine}Error message: {e.Message}", e);
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\CompilerServices\ExceptionUtils.vb (1)
273Return New IO.IOException(Description)
Microsoft.VisualStudio.LanguageServices.UnitTests (1)
SymbolSearch\SymbolSearchUpdateEngineTests.vb (1)
365Throws(New IOException())
MSBuild (5)
CommunicationsUtilities.cs (3)
543throw new IOException(string.Format(CultureInfo.InvariantCulture, "Did not receive return handshake in {0}ms", timeout)); 565throw new IOException(String.Format(CultureInfo.InvariantCulture, "Unexpected end of stream while reading for handshake")); 584throw new IOException(String.Format(CultureInfo.InvariantCulture, "Failed to convert the handshake to big-endian. {0}", ex.Message));
InterningBinaryReader.cs (1)
95throw new IOException();
TempFileUtilities.cs (1)
199throw new IOException(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("Shared.FailedCreatingTempFile", ex.Message), ex);
MSBuildTaskHost (3)
CommunicationsUtilities.cs (2)
565throw new IOException(String.Format(CultureInfo.InvariantCulture, "Unexpected end of stream while reading for handshake")); 584throw new IOException(String.Format(CultureInfo.InvariantCulture, "Failed to convert the handshake to big-endian. {0}", ex.Message));
InterningBinaryReader.cs (1)
95throw new IOException();
PrepareTests (2)
MinimizeUtil.cs (2)
285throw new IOException($"Failed to create hard link from {existingFileName} to {fileName} with exception 0x{Marshal.GetLastWin32Error():X}"); 293throw new IOException($"Failed to create hard link from {existingFileName} to {fileName} with error code {Marshal.GetLastWin32Error()}");
PresentationCore (10)
MS\Internal\FontCache\FontCacheUtil.cs (4)
776return new IOException(SR.Format(SR.IOExceptionWithFileName, fileName), e); 833throw new IOException(SR.Format(SR.IOExceptionWithFileName, fileName)); 849throw new IOException(SR.Format(SR.IOExceptionWithFileName, fileName)); 853throw new IOException(SR.Format(SR.IOExceptionWithFileName, fileName));
MS\Internal\WpfWebRequestHelper.cs (2)
190throw new IOException(SR.Format(SR.GetResponseFailed, requestUri.ToString())); 206throw new IOException(SR.Format(SR.GetResponseFailed, requestUri.ToString()));
src\Microsoft.DotNet.Wpf\src\Common\Graphics\wgx_render.cs (3)
872return new System.IO.IOException(SR.Image_StreamRead, exceptionForHR); 875return new System.IO.IOException(SR.Image_InvalidQueryRequest, exceptionForHR); 884return new System.IO.IOException(SR.Image_InvalidQueryCharacter, exceptionForHR);
System\Windows\Media\Imaging\BitmapDownload.cs (1)
153throw new IOException(SR.Image_CannotCreateTempFile);
PresentationFramework (8)
MS\Internal\AppModel\ContentFilePart.cs (1)
75throw new IOException(SR.Format(SR.UnableToLocateResource, Uri.ToString()));
MS\Internal\AppModel\ResourceContainer.cs (1)
305throw new IOException(SR.EntryAssemblyIsNull);
MS\Internal\AppModel\ResourcePart.cs (2)
62throw new IOException(SR.Format(SR.UnableToLocateResource, _name)); 118throw new IOException(SR.Format(SR.UnableToLocateResource, _name));
MS\Internal\IO\Packaging\ByteStream.cs (1)
153throw new IOException(SR.SeekFailed);
MS\Internal\IO\Packaging\ManagedIStream.cs (1)
136throw new IOException(SR.StreamObjectDisposed);
MS\Internal\IO\Packaging\UnsafeIndexingFilterStream.cs (2)
110throw new IOException("Read", comException); 115throw new IOException("Read", ioException);
PresentationUI (4)
MS\Internal\Documents\Application\WriteableOnDemandPackagePart.cs (2)
192throw new IOException( 198throw new IOException(
MS\Internal\Documents\Application\WriteableOnDemandStream.cs (2)
287throw new IOException( 293throw new IOException(
ReachFramework (1)
Packaging\XpsManager.cs (1)
1462throw new IOException(SR.ReachPackaging_CannotModifyReadOnlyContainer);
Sockets.BindTests (1)
src\Servers\Kestrel\shared\test\StreamBackedTestConnection.cs (1)
145throw new IOException(
Sockets.FunctionalTests (1)
src\Servers\Kestrel\shared\test\StreamBackedTestConnection.cs (1)
145throw new IOException(
System.Configuration.ConfigurationManager (1)
System\Configuration\Internal\InternalConfigHost.cs (1)
259throw new IOException(SR.Format(SR.Config_invalid_attributes_for_write, streamName));
System.Console (6)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (4)
151new IOException(SR.Format(SR.IO_SharingViolation_File, path), errorInfo.RawErrno) : 152new IOException(SR.IO_SharingViolation_NoFileName, errorInfo.RawErrno); 163return new IOException(SR.Format(SR.IO_FileExists_Name, path), errorInfo.RawErrno); 182return new IOException(
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPwUid.cs (1)
93throw new IOException(errorInfo.GetErrorMessage(), errorInfo.RawErrno);
src\libraries\System.Private.CoreLib\src\System\IO\PersistedFiles.Unix.cs (1)
126throw new IOException(errorInfo.GetErrorMessage(), errorInfo.RawErrno);
System.Diagnostics.Process (1)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPwUid.cs (1)
93throw new IOException(errorInfo.GetErrorMessage(), errorInfo.RawErrno);
System.Formats.Tar (14)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (4)
151new IOException(SR.Format(SR.IO_SharingViolation_File, path), errorInfo.RawErrno) : 152new IOException(SR.IO_SharingViolation_NoFileName, errorInfo.RawErrno); 163return new IOException(SR.Format(SR.IO_FileExists_Name, path), errorInfo.RawErrno); 182return new IOException(
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPwUid.cs (1)
93throw new IOException(errorInfo.GetErrorMessage(), errorInfo.RawErrno);
System\Formats\Tar\SeekableSubReadStream.cs (1)
95throw new IOException(SR.IO_SeekBeforeBegin);
System\Formats\Tar\TarEntry.cs (6)
356throw new IOException(SR.Format(SR.TarExtractingResultsFileOutside, name, destinationDirectoryPath)); 370throw new IOException(SR.Format(SR.TarExtractingResultsLinkOutside, linkName, destinationDirectoryPath)); 385throw new IOException(SR.Format(SR.TarExtractingResultsLinkOutside, linkName, destinationDirectoryPath)); 509throw new IOException(SR.Format(SR.IO_PathNotFound_Path, filePath)); 520throw new IOException(SR.Format(SR.IO_AlreadyExists_Name, filePath)); 526throw new IOException(SR.Format(SR.IO_AlreadyExists_Name, filePath));
System\Formats\Tar\TarWriter.cs (1)
383throw new IOException(SR.Format(SR.TarStreamSeekabilityUnsupportedCombination, entry.Name));
System\Formats\Tar\TarWriter.Unix.cs (1)
38_ => throw new IOException(SR.Format(SR.TarUnsupportedFile, fullPath)),
System.IO.Compression (8)
System\IO\Compression\ZipArchive.cs (1)
412throw new IOException(SR.CreateModeCreateEntryWhileOpen);
System\IO\Compression\ZipArchiveEntry.Async.cs (1)
210throw new IOException(SR.UpdateModeOneStream);
System\IO\Compression\ZipArchiveEntry.cs (4)
283throw new IOException(SR.FrozenAfterWrite); 329throw new IOException(SR.DeleteOpenEntry); 784throw new IOException(SR.CreateModeWriteOnceAndOneEntryAtATime); 806throw new IOException(SR.UpdateModeOneStream);
System\IO\Compression\ZipHelper.Async.cs (1)
24throw new IOException(SR.UnexpectedEndOfStream);
System\IO\Compression\ZipHelper.cs (1)
43throw new IOException(SR.UnexpectedEndOfStream);
System.IO.Compression.Brotli (3)
System\IO\Compression\dec\BrotliDecoder.cs (1)
21throw new IOException(SR.BrotliDecoder_Create);
System\IO\Compression\enc\BrotliEncoder.cs (2)
29throw new IOException(SR.BrotliEncoder_Create); 44throw new IOException(SR.BrotliEncoder_Create);
System.IO.Compression.ZipFile (8)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (4)
151new IOException(SR.Format(SR.IO_SharingViolation_File, path), errorInfo.RawErrno) : 152new IOException(SR.IO_SharingViolation_NoFileName, errorInfo.RawErrno); 163return new IOException(SR.Format(SR.IO_FileExists_Name, path), errorInfo.RawErrno); 182return new IOException(
System\IO\Compression\ZipFile.Create.Async.cs (1)
490throw new IOException(SR.Format(SR.ZipUnsupportedFile, fullPath));
System\IO\Compression\ZipFile.Create.cs (1)
457throw new IOException(SR.Format(SR.ZipUnsupportedFile, fullPath));
System\IO\Compression\ZipFileExtensions.ZipArchiveEntry.Extract.cs (2)
125throw new IOException(SR.IO_ExtractingResultsInOutside); 130throw new IOException(SR.IO_DirectoryNameWithData);
System.IO.FileSystem.DriveInfo (4)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (4)
151new IOException(SR.Format(SR.IO_SharingViolation_File, path), errorInfo.RawErrno) : 152new IOException(SR.IO_SharingViolation_NoFileName, errorInfo.RawErrno); 163return new IOException(SR.Format(SR.IO_FileExists_Name, path), errorInfo.RawErrno); 182return new IOException(
System.IO.FileSystem.Watcher (7)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (4)
151new IOException(SR.Format(SR.IO_SharingViolation_File, path), errorInfo.RawErrno) : 152new IOException(SR.IO_SharingViolation_NoFileName, errorInfo.RawErrno); 163return new IOException(SR.Format(SR.IO_FileExists_Name, path), errorInfo.RawErrno); 182return new IOException(
System\IO\FileSystemWatcher.Linux.cs (3)
48throw new IOException(message, error.RawErrno); 50throw new IOException(SR.IOException_INotifyInstanceSystemLimitExceeded, error.RawErrno); 381exc = new IOException(message, error.RawErrno);
System.IO.MemoryMappedFiles (6)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (4)
151new IOException(SR.Format(SR.IO_SharingViolation_File, path), errorInfo.RawErrno) : 152new IOException(SR.IO_SharingViolation_NoFileName, errorInfo.RawErrno); 163return new IOException(SR.Format(SR.IO_FileExists_Name, path), errorInfo.RawErrno); 182return new IOException(
System\IO\MemoryMappedFiles\MemoryMappedFile.Unix.cs (1)
85throw new IOException(exc.Message, exc);
System\IO\MemoryMappedFiles\MemoryMappedView.Unix.cs (1)
18throw new IOException(SR.ArgumentOutOfRange_CapacityLargerThanLogicalAddressSpaceNotAllowed);
System.IO.Packaging (6)
System\IO\Packaging\Package.cs (2)
807throw new IOException(SR.CannotModifyReadOnlyContainer); 814throw new IOException(SR.CannotRetrievePartsOfWriteOnlyContainer);
System\IO\Packaging\PackagePart.cs (3)
324throw new IOException(SR.NullStreamReturned); 696throw new IOException(SR.UnsupportedCombinationOfModeAccess); 701throw new IOException(SR.ContainerAndPartModeIncompatible);
System\IO\Packaging\ZipPackage.cs (1)
377throw new IOException(SR.CreateNewOnNonEmptyStream);
System.IO.Pipes (13)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (4)
151new IOException(SR.Format(SR.IO_SharingViolation_File, path), errorInfo.RawErrno) : 152new IOException(SR.IO_SharingViolation_NoFileName, errorInfo.RawErrno); 163return new IOException(SR.Format(SR.IO_FileExists_Name, path), errorInfo.RawErrno); 182return new IOException(
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPwUid.cs (1)
93throw new IOException(errorInfo.GetErrorMessage(), errorInfo.RawErrno);
System\IO\Error.cs (1)
36return new IOException(SR.IO_OperationAborted_Unexpected);
System\IO\Pipes\NamedPipeClientStream.cs (1)
224throw new IOException(SR.IO_PipeBroken);
System\IO\Pipes\NamedPipeServerStream.cs (1)
185throw new IOException(SR.IO_PipeBroken);
System\IO\Pipes\NamedPipeServerStream.Unix.cs (2)
90throw new IOException(SR.IO_PipeBroken); 269throw new IOException(SR.IO_AllPipeInstancesAreBusy);
System\IO\Pipes\PipeStream.cs (1)
379throw new IOException(SR.IO_PipeBroken);
System\IO\Pipes\PipeStream.Unix.cs (2)
241throw new IOException(SR.IO_InvalidPipeHandle); 338return new IOException(e.Message, e);
System.IO.Ports (4)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (4)
151new IOException(SR.Format(SR.IO_SharingViolation_File, path), errorInfo.RawErrno) : 152new IOException(SR.IO_SharingViolation_NoFileName, errorInfo.RawErrno); 163return new IOException(SR.Format(SR.IO_FileExists_Name, path), errorInfo.RawErrno); 182return new IOException(
System.Memory.Data (1)
src\libraries\Common\src\System\IO\ReadOnlyMemoryStream.cs (1)
77throw new IOException(SR.IO_SeekBeforeBegin);
System.Net.Http (6)
src\libraries\Common\src\System\IO\ReadOnlyMemoryStream.cs (1)
77throw new IOException(SR.IO_SeekBeforeBegin);
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (2)
258throw new IOException(SR.net_http_http2_connection_not_established, e); 2176innerException as HttpIOException ?? new IOException(SR.net_http_request_aborted, innerException);
System\Net\Http\SocketsHttpHandler\RawConnectionStream.cs (2)
155throw new IOException(SR.ObjectDisposed_StreamClosed); 174return ValueTask.FromException(ExceptionDispatchInfo.SetCurrentStackTrace(new IOException(SR.ObjectDisposed_StreamClosed)));
System\Net\Http\SocketsHttpHandler\SocksHelper.cs (1)
362throw new IOException(SR.net_http_invalid_response_premature_eof);
System.Net.Mail (2)
System\Net\Mail\SmtpReplyReaderFactory.cs (2)
114throw new IOException(SR.Format(SR.net_io_readfailure, SR.net_io_connectionclosed)); 452throw new IOException(SR.Format(SR.net_io_readfailure, SR.net_io_connectionclosed));
System.Net.Quic (2)
System\Net\Quic\QuicStream.Stream.cs (2)
133throw new IOException(SR.net_quic_timeout); 192throw new IOException(SR.net_quic_timeout);
System.Net.Security (18)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (1)
886result == -1 && lastErrno.Error != Error.SUCCESS ? new IOException(lastErrno.GetErrorMessage(), lastErrno.RawErrno) : // underlying I/O error
System\Net\Security\NegotiateStream.cs (6)
379throw new IOException(SR.net_frame_read_size); 420throw new IOException(SR.net_io_read); 440throw new IOException(SR.net_io_read, e); 455throw new IOException(SR.net_io_eof); 541throw new IOException(SR.net_io_encrypt); 554throw new IOException(SR.net_io_write, e);
System\Net\Security\SslStream.IO.cs (9)
417throw new IOException(SR.net_io_eof); 655return ValueTask.FromException(ExceptionDispatchInfo.SetCurrentStackTrace(new IOException(SR.net_io_encrypt, SslStreamPal.GetException(token.Status)))); 690throw new IOException(SR.net_io_encrypt, SslStreamPal.GetException(token.Status)); 761throw new IOException(SR.net_io_eof); 890throw new IOException(SR.net_ssl_io_renego); 901throw new IOException(SR.net_io_decrypt, SslStreamPal.GetException(status)); 950throw new IOException(SR.net_io_read, e); 989throw new IOException(SR.net_io_write, e); 1021throw new IOException(SR.net_ssl_io_frame);
System\Net\StreamFramer.cs (2)
44throw new IOException(SR.Format(SR.net_io_readfailure, SR.net_io_connectionclosed)); 63throw new IOException(SR.Format(SR.net_io_readfailure, SR.net_io_connectionclosed));
System.Net.Sockets (6)
System\Net\Sockets\NetworkStream.cs (4)
55throw new IOException(SR.net_sockets_blocking); 59throw new IOException(SR.net_notconnected); 63throw new IOException(SR.net_notstream); 721return new IOException(SR.Format(resourceFormatString, innerException.Message), innerException);
System\Net\Sockets\Socket.Tasks.cs (2)
927new IOException(SR.Format(SR.net_io_readwritefailure, e.Message), e) : 1399new IOException(SR.Format(_isReadForCaching ? SR.net_io_readfailure : SR.net_io_writefailure, e.Message), e) :
System.Private.CoreLib (46)
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (4)
151new IOException(SR.Format(SR.IO_SharingViolation_File, path), errorInfo.RawErrno) : 152new IOException(SR.IO_SharingViolation_NoFileName, errorInfo.RawErrno); 163return new IOException(SR.Format(SR.IO_FileExists_Name, path), errorInfo.RawErrno); 182return new IOException(
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPwUid.cs (1)
93throw new IOException(errorInfo.GetErrorMessage(), errorInfo.RawErrno);
src\libraries\Common\src\System\IO\Win32Marshal.cs (4)
45return new IOException(SR.Format(SR.IO_AlreadyExists_Name, path), MakeHRFromErrorCode(errorCode)); 50return new IOException( 56return new IOException(SR.Format(SR.IO_FileExists_Name, path), MakeHRFromErrorCode(errorCode)); 72return new IOException(msg, MakeHRFromErrorCode(errorCode));
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeFileHandle.Unix.cs (1)
455throw new IOException(SR.Format(errorInfo.Error == Interop.Error.EFBIG
src\libraries\System.Private.CoreLib\src\System\IO\BinaryReader.cs (2)
239throw new IOException(SR.Arg_DecBitCtor, e); 251throw new IOException(SR.Format(SR.IO_InvalidStringLen_Len, stringLength));
src\libraries\System.Private.CoreLib\src\System\IO\File.cs (2)
704throw new IOException(SR.IO_FileTooLong2GB); 1184return Task.FromException<byte[]>(ExceptionDispatchInfo.SetCurrentStackTrace(new IOException(SR.IO_FileTooLong2GB)));
src\libraries\System.Private.CoreLib\src\System\IO\FileSystem.cs (1)
43throw new IOException(SR.IO_SourceDestMustBeDifferent);
src\libraries\System.Private.CoreLib\src\System\IO\FileSystem.Unix.cs (10)
59return new IOException(SR.Format(SR.Arg_FileIsDirectory_Name, path)); 146throw new IOException(SR.Format(SR.IO_CannotReplaceSameFile, sourceFullPath, destFullPath)); 409throw new IOException(SR.Format(SR.IO_PathNotFound_Path, sourceFullPath)); 434throw new IOException(SR.IO_SourceDestMustBeDifferent); 441throw new IOException(SR.Format(SR.IO_PathNotFound_Path, sourceFullPath)); 445throw new IOException(SR.Format(SR.IO_AlreadyExists_Name, destFullPath)); 455throw new IOException(SR.Format(SR.UnauthorizedAccess_IODenied_Path, sourceFullPath), errorInfo.RawErrno); 459throw new IOException(SR.Format(SR.IO_PathNotFound_Path, sourceFullPath)); 565throw new IOException(SR.Format(SR.UnauthorizedAccess_IODenied_Path, fullPath)); 704throw new IOException(SR.Format(SR.IO_TooManySymbolicLinkLevels, linkPath));
src\libraries\System.Private.CoreLib\src\System\IO\MemoryStream.cs (4)
133throw new IOException(SR.IO_StreamTooLong); 530throw new IOException(SR.IO_SeekBeforeBegin); 587throw new IOException(SR.IO_StreamTooLong); 638throw new IOException(SR.IO_StreamTooLong);
src\libraries\System.Private.CoreLib\src\System\IO\PersistedFiles.Unix.cs (1)
126throw new IOException(errorInfo.GetErrorMessage(), errorInfo.RawErrno);
src\libraries\System.Private.CoreLib\src\System\IO\Strategies\OSFileStreamStrategy.cs (2)
169throw new IOException(SR.IO_SeekAppendOverwrite); 182throw new IOException(SR.IO_SetLengthAppendTruncate);
src\libraries\System.Private.CoreLib\src\System\IO\Stream.cs (1)
788throw new IOException(SR.IO_StreamTooLong);
src\libraries\System.Private.CoreLib\src\System\IO\TextReader.cs (2)
105throw new IOException(SR.IO_InvalidReadLength); 155throw new IOException(SR.IO_InvalidReadLength);
src\libraries\System.Private.CoreLib\src\System\IO\UnmanagedMemoryStream.cs (7)
319throw new IOException(SR.IO_SeekBeforeBegin); 542throw new IOException(SR.IO_SeekBeforeBegin); 548throw new IOException(SR.IO_SeekBeforeBegin); 554throw new IOException(SR.IO_SeekBeforeBegin); 579throw new IOException(SR.IO_FixedCapacity); 636throw new IOException(SR.IO_StreamTooLong); 765throw new IOException(SR.IO_StreamTooLong);
src\libraries\System.Private.CoreLib\src\System\IO\UnmanagedMemoryStreamWrapper.cs (1)
59set => throw new IOException(SR.IO_FixedCapacity);
src\libraries\System.Private.CoreLib\src\System\Threading\Semaphore.cs (1)
136throw new IOException(SR.Format(SR.IO_PathNotFound_Path, name));
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.NonAndroid.cs (2)
40throw new IOException(SR.IO_UnseekableFile); 45throw new IOException(fs.Length == 0 ? SR.IO_InvalidReadLength : SR.IO_FileTooLong);
System.Reflection.Metadata (1)
System\Reflection\Internal\MemoryBlocks\StreamMemoryBlockProvider.cs (1)
138throw new IOException(e.Message, e);
System.Security.Cryptography (3)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPwUid.cs (1)
93throw new IOException(errorInfo.GetErrorMessage(), errorInfo.RawErrno);
src\libraries\System.Private.CoreLib\src\System\IO\PersistedFiles.Unix.cs (1)
126throw new IOException(errorInfo.GetErrorMessage(), errorInfo.RawErrno);
System\Security\Cryptography\X509Certificates\OpenSslDirectoryBasedStoreProvider.cs (1)
371new IOException(error.GetErrorMessage(), error.RawErrno));
System.Windows.Forms (2)
System\Windows\Forms\ActiveX\DataStreamFromComStream.cs (2)
124throw new IOException(SR.DataStreamWrite); 146throw new IOException(SR.DataStreamWrite);
System.Windows.Forms.Design.Tests (1)
System\Drawing\Design\ToolboxItemTests.cs (1)
1234throw new IOException();
782 references to IOException
Aspire.EndToEnd.Tests (2)
tests\Shared\TemplatesTesting\BuildEnvironment.cs (2)
237catch (IOException) when (!EnvironmentVariables.IsRunningOnCI) 248catch (IOException ioex)
Aspire.Hosting (2)
Dashboard\DashboardService.cs (1)
193catch (IOException) when (cts.Token.IsCancellationRequested)
Devcontainers\DevcontainerSettingsWriter.cs (1)
172catch (IOException ex) when (ex.Message == $"The file '{path}' already exists.")
Aspire.Hosting.Azure.Tests (1)
AzureResourceOptionsTests.cs (1)
130catch (IOException ex)
Aspire.Templates.Tests (2)
tests\Shared\TemplatesTesting\BuildEnvironment.cs (2)
237catch (IOException) when (!EnvironmentVariables.IsRunningOnCI) 248catch (IOException ioex)
BuildValidator (1)
Program.cs (1)
133catch (IOException)
Client.ClientBase.IntegrationTests (1)
SessionTests.cs (1)
196catch (System.IO.IOException)
ClientSample (2)
Tcp\TcpConnection.cs (2)
138catch (IOException ex) 199catch (IOException ex)
csc (2)
src\Compilers\Shared\BuildServerConnection.cs (2)
402catch (Exception e) when (e is IOException || e is TimeoutException) 687catch (IOException)
dotnet-svcutil-lib (11)
FrameworkFork\Microsoft.CodeDom\Compiler\TempFiles.cs (1)
223catch (IOException e)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\Connection.cs (8)
516private Exception ConvertIOException(IOException ioException) 543catch (IOException ioException) 573catch (IOException ioException) 600catch (IOException ioException) 622catch (IOException ioException) 661catch (IOException ioException) 686catch (IOException ioException) 705catch (IOException ioException)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SslStreamSecurityUpgradeProvider.cs (2)
363catch (IOException ioException) 613catch (IOException ioException)
HttpStress (2)
Program.cs (2)
130if (e is HttpRequestException hre && hre.InnerException is IOException) 135if (e is IOException ioe)
IIS.LongTests (3)
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (3)
70catch (HttpRequestException ex) when (ex.InnerException is IOException) 438catch (HttpRequestException ex) when (ex.InnerException is IOException | ex.InnerException is SocketException) 594catch (HttpRequestException ex) when (ex.InnerException is IOException | ex.InnerException is SocketException)
IIS.NewHandler.FunctionalTests (3)
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (3)
70catch (HttpRequestException ex) when (ex.InnerException is IOException) 438catch (HttpRequestException ex) when (ex.InnerException is IOException | ex.InnerException is SocketException) 594catch (HttpRequestException ex) when (ex.InnerException is IOException | ex.InnerException is SocketException)
IIS.NewShim.FunctionalTests (3)
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (3)
70catch (HttpRequestException ex) when (ex.InnerException is IOException) 438catch (HttpRequestException ex) when (ex.InnerException is IOException | ex.InnerException is SocketException) 594catch (HttpRequestException ex) when (ex.InnerException is IOException | ex.InnerException is SocketException)
IISExpress.FunctionalTests (5)
InProcess\IISExpressShutdownTests.cs (2)
35catch (HttpRequestException ex) when (ex.InnerException is IOException) 65catch (HttpRequestException ex) when (ex.InnerException is IOException | ex.InnerException is SocketException)
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (3)
70catch (HttpRequestException ex) when (ex.InnerException is IOException) 438catch (HttpRequestException ex) when (ex.InnerException is IOException | ex.InnerException is SocketException) 594catch (HttpRequestException ex) when (ex.InnerException is IOException | ex.InnerException is SocketException)
illink (1)
InMemory.FunctionalTests (16)
Http2\Http2ConnectionTests.cs (1)
5318var ioException = new IOException();
Http2\Http2StreamTests.cs (10)
1137IOException thrownEx = null; 1148thrownEx = await Assert.ThrowsAsync<IOException>(async () => 1172IOException thrownEx = null; 1183thrownEx = await Assert.ThrowsAsync<IOException>(async () => 1207IOException thrownEx = null; 1218thrownEx = await Assert.ThrowsAsync<IOException>(async () => 1243IOException thrownEx = null; 1254thrownEx = await Assert.ThrowsAsync<IOException>(async () => 3257catch (IOException) // Expected failure 3300catch (IOException) // Expected failure
HttpsConnectionMiddlewareTests.cs (3)
428await Assert.ThrowsAsync<IOException>(() => 490await Assert.ThrowsAsync<IOException>(() => 1538catch (IOException) { }
HttpsTests.cs (2)
560var ex = await Assert.ThrowsAsync<IOException>(async () =>
Interop.FunctionalTests (8)
Http3\Http3RequestTests.cs (4)
521var serverEx = await Assert.ThrowsAsync<IOException>(() => serverReadTask).DefaultTimeout(); 1046var serverEx = await Assert.ThrowsAsync<IOException>(() => serverReadTask).DefaultTimeout();
HttpClientHttp2InteropTests.cs (4)
825var ex = await Assert.ThrowsAsync<IOException>(() => readTask).DefaultTimeout(); 872var ex = await Assert.ThrowsAsync<IOException>(() => readTask).DefaultTimeout();
Metrics (2)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
29/// <exception cref="IOException">Exception while performing any I/O on given file paths.</exception> 46/// <exception cref="IOException">Exception while performing any I/O on given file paths.</exception>
Metrics.Legacy (2)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
29/// <exception cref="IOException">Exception while performing any I/O on given file paths.</exception> 46/// <exception cref="IOException">Exception while performing any I/O on given file paths.</exception>
Microsoft.AspNetCore.Antiforgery (1)
Internal\DefaultAntiforgeryTokenStore.cs (1)
66catch (IOException ex)
Microsoft.AspNetCore.Antiforgery.Test (1)
DefaultAntiforgeryTokenStoreTest.cs (1)
296var ioException = new IOException();
Microsoft.AspNetCore.Components.Web (1)
Forms\InputFile\IBrowserFile.cs (1)
55/// <exception cref="IOException">Thrown if the file's length exceeds the <paramref name="maxAllowedSize"/> value.</exception>
Microsoft.AspNetCore.Components.Web.Tests (2)
Forms\BrowserFileTest.cs (2)
28var ex = Assert.Throws<IOException>(() => file.OpenReadStream(80));
Microsoft.AspNetCore.DataProtection (1)
Repositories\FileSystemXmlRepository.cs (1)
166catch (IOException)
Microsoft.AspNetCore.Diagnostics (2)
DeveloperExceptionPage\DeveloperExceptionPageMiddlewareImpl.cs (1)
120if ((ex is OperationCanceledException || ex is IOException) && context.RequestAborted.IsCancellationRequested)
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (1)
117if ((edi.SourceException is OperationCanceledException || edi.SourceException is IOException) && context.RequestAborted.IsCancellationRequested)
Microsoft.AspNetCore.Http (2)
Extensions\HttpRequestRewindExtensions.cs (2)
53/// <see cref="System.IO.IOException"/>. 77/// <see cref="System.IO.IOException"/>.
Microsoft.AspNetCore.Http.Connections (3)
Internal\HttpConnectionDispatcher.cs (1)
518catch (IOException ex)
Internal\HttpConnectionManager.cs (2)
209catch (IOException ex) 213catch (WebSocketException ex) when (ex.InnerException is IOException)
Microsoft.AspNetCore.Http.Extensions (4)
RequestDelegateFactory.cs (4)
1404catch (IOException ex) 1536catch (IOException ex) 2651public static void RequestBodyIOException(HttpContext httpContext, IOException exception) 2655private static partial void RequestBodyIOException(ILogger logger, IOException exception);
Microsoft.AspNetCore.Http.Extensions.Tests (2)
RequestDelegateGenerator\RequestDelegateCreationTests.Forms.cs (1)
927var ioException = new IOException();
RequestDelegateGenerator\RequestDelegateCreationTests.Logging.cs (1)
478var ioException = new IOException();
Microsoft.AspNetCore.HttpLogging.Tests (3)
HttpLoggingMiddlewareTests.cs (3)
898await Assert.ThrowsAsync<IOException>(() => middleware.Invoke(httpContext)); 923await Assert.ThrowsAsync<IOException>(() => middleware.Invoke(httpContext)); 1588await Assert.ThrowsAsync<IOException>(() => middleware.Invoke(httpContext));
Microsoft.AspNetCore.Mvc.Core (3)
ModelBinding\FormFileValueProviderFactory.cs (1)
45catch (IOException ex)
ModelBinding\FormValueProviderFactory.cs (1)
47catch (IOException ex)
ModelBinding\JQueryFormValueProviderFactory.cs (1)
47catch (IOException ex)
Microsoft.AspNetCore.Mvc.Core.Test (8)
ModelBinding\Binders\BodyModelBinderTests.cs (5)
458var exception = await Assert.ThrowsAsync<IOException>(() => binder.BindModelAsync(bindingContext)); 504Assert.IsType<IOException>(entry.Value.Errors[0].Exception); 526var exception = await Assert.ThrowsAsync<IOException>(
ModelBinding\FormFileValueProviderFactoryTest.cs (1)
78var exception = new IOException();
ModelBinding\FormValueProviderFactoryTest.cs (1)
66var exception = new IOException();
ModelBinding\JQueryFormValueProviderFactoryTest.cs (1)
151var exception = new IOException();
Microsoft.AspNetCore.Server.HttpSys (6)
RequestProcessing\RequestContextOfT.cs (2)
69if ((ex is OperationCanceledException || ex is IOException) && DisconnectToken.IsCancellationRequested) 104else if ((ex is OperationCanceledException || ex is IOException) && DisconnectToken.IsCancellationRequested)
RequestProcessing\ResponseBody.cs (3)
176var exception = new IOException(string.Empty, new HttpSysException((int)statusCode)); 715var exception = new IOException(string.Empty, new HttpSysException((int)statusCode)); 790public static partial void WriteError(ILogger logger, IOException exception);
RequestProcessing\ResponseStreamAsyncResult.cs (1)
245var exception = new IOException(string.Empty, new HttpSysException((int)errorCode));
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (15)
Http2Tests.cs (3)
859await Assert.ThrowsAsync<IOException>(() => readTask); 907await Assert.ThrowsAsync<IOException>(() => readTask); 957await Assert.ThrowsAsync<IOException>(() => readTask);
Listener\RequestBodyTests.cs (3)
135await Assert.ThrowsAsync<IOException>(async () => await readTask); 160await Assert.ThrowsAsync<IOException>(async () => await readTask); 185var assertTask = Assert.ThrowsAsync<IOException>(async () => await context.Request.Body.ReadAsync(input, 0, input.Length, context.DisconnectToken));
Listener\ResponseBodyTests.cs (4)
251await Assert.ThrowsAsync<IOException>(async () => 287await Assert.ThrowsAsync<IOException>(async () => 385await Assert.ThrowsAsync<IOException>(async () => 424await Assert.ThrowsAsync<IOException>(async () =>
RequestTests.cs (1)
568catch (IOException)
ResponseSendFileTests.cs (2)
497await Assert.ThrowsAsync<IOException>(async () => 595await Assert.ThrowsAsync<IOException>(async () =>
ResponseTests.cs (1)
232catch (IOException)
ServerTests.cs (1)
330Assert.ThrowsAny<IOException>(() => client.GetStream().Read(new byte[10], 0, 10));
Microsoft.AspNetCore.Server.IIS (1)
Core\IISHttpContextOfT.cs (1)
47if ((ex is OperationCanceledException || ex is IOException) && ClientDisconnected)
Microsoft.AspNetCore.Server.Kestrel.Core (10)
AnyIPListenOptions.cs (1)
27catch (Exception ex) when (ex is not IOException
Internal\Http\HttpProtocol.cs (2)
597catch (IOException ex) 715if ((ex is OperationCanceledException || ex is IOException) && _connectionAborted)
Internal\Http2\Http2Connection.cs (2)
405catch (IOException ex) 1387private void AbortStream(int streamId, IOException error)
Internal\Http2\Http2Stream.cs (1)
569public void Abort(IOException abortReason)
Internal\Http3\Http3Connection.cs (1)
475catch (IOException ex)
LocalhostListenOptions.cs (2)
38catch (Exception ex) when (!(ex is IOException or OperationCanceledException)) 52catch (Exception ex) when (!(ex is IOException or OperationCanceledException))
Middleware\HttpsConnectionMiddleware.cs (1)
183catch (IOException ex)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (3)
AddressBinderTests.cs (1)
168await Assert.ThrowsAsync<IOException>(() =>
MessageBodyTests.cs (2)
378var ex = await Assert.ThrowsAsync<IOException>(async () =>
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
NamedPipesTransportBenchmark.cs (1)
113catch (IOException)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
Internal\NamedPipeConnectionListener.cs (1)
127catch (IOException ex) when (!_listeningToken.IsCancellationRequested)
Microsoft.AspNetCore.SignalR.Client.Core (1)
HubConnection.cs (1)
1504var ex = new IOException("The server disconnected before the handshake could be started.");
Microsoft.AspNetCore.SignalR.Specification.Tests (6)
HubLifetimeManagerTestBase.cs (3)
280await Assert.ThrowsAsync<IOException>(() => manager1.InvokeConnectionAsync<int>("none", "Result", new object[] { "test" }, cancellationToken: default)).DefaultTimeout(); 337var ex = await Assert.ThrowsAsync<IOException>(() => invoke1).DefaultTimeout();
ScaleoutHubLifetimeManagerTests.cs (3)
547await Assert.ThrowsAsync<IOException>(() => manager1.InvokeConnectionAsync<int>("none", "Result", new object[] { "test" }, cancellationToken: default)).DefaultTimeout(); 626var ex = await Assert.ThrowsAsync<IOException>(() => manager1.InvokeConnectionAsync<int>("1234", "Result", new object[] { "test" }, cancellationToken: default)).DefaultTimeout();
Microsoft.AspNetCore.SignalR.Tests (2)
HubConnectionHandlerTests.ClientResult.cs (2)
122var ex = await Assert.ThrowsAsync<IOException>(() => connectionHandlerTask).DefaultTimeout();
Microsoft.AspNetCore.SpaServices.Extensions (1)
Proxying\SpaProxy.cs (1)
112catch (IOException)
Microsoft.AspNetCore.TestHost.Tests (5)
HttpContextBuilderTests.cs (2)
300var ex = Assert.Throws<IOException>(() => context.Response.Body.Read(new byte[100], 0, 100));
TestClientTests.cs (3)
441var ex = await Assert.ThrowsAsync<IOException>(async () => 776await Assert.ThrowsAsync<IOException>(async () => await clientSocket.ReceiveAsync(new System.ArraySegment<byte>(buffer), CancellationToken.None));
Microsoft.AspNetCore.WebUtilities.Tests (18)
FileBufferingReadStreamTests.cs (8)
159var exception = Assert.Throws<IOException>(() => stream.Read(bytes, 0, bytes.Length)); 191var exception = Assert.Throws<IOException>(() => stream.Read(bytes, 0, bytes.Length)); 362var exception = await Assert.ThrowsAsync<IOException>(() => stream.ReadAsync(bytes, 0, bytes.Length)); 394var exception = await Assert.ThrowsAsync<IOException>(() => stream.ReadAsync(bytes, 0, bytes.Length));
FileBufferingWriteStreamTests.cs (8)
255var exception = Assert.Throws<IOException>(() => bufferingStream.Write(input, 0, input.Length)); 270var exception = Assert.Throws<IOException>(() => bufferingStream.Write(input, 0, input.Length)); 299var exception = await Assert.ThrowsAsync<IOException>(() => bufferingStream.WriteAsync(input, 0, input.Length)); 314var exception = await Assert.ThrowsAsync<IOException>(() => bufferingStream.WriteAsync(input, 0, input.Length));
HttpResponseStreamWriterTest.cs (1)
192await Assert.ThrowsAsync<IOException>(() => writer.FlushAsync());
MultipartReaderTests.cs (1)
378await Assert.ThrowsAsync<IOException>(async () =>
Microsoft.Build (19)
BackEnd\Client\MSBuildClient.cs (2)
206catch (IOException ex) when (ex is not PathTooLongException) 460catch (IOException ex) when (ex is not PathTooLongException)
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (4)
786catch (IOException e) 940catch (IOException e) 984catch (IOException e) 1026catch (IOException e)
BackEnd\Components\Scheduler\SchedulingPlan.cs (2)
126catch (IOException) 172catch (IOException)
CommunicationsUtilities.cs (1)
851catch (IOException)
Construction\Solution\ProjectInSolution.cs (1)
377catch (IOException e)
Construction\Solution\SolutionFile.cs (1)
1246catch (IOException e)
ExceptionHandling.cs (2)
168|| e is IOException; 295|| e is IOException
FileUtilities.cs (1)
965catch (Exception ex) when (ex is IOException || ex is UnauthorizedAccessException)
Logging\BaseConsoleLogger.cs (3)
310catch (IOException) 325catch (IOException) 423catch (IOException)
Logging\ProfilerLogger.cs (1)
302IOException or
NodeEndpointOutOfProcBase.cs (1)
447catch (IOException e)
Microsoft.Build.Engine.OM.UnitTests (3)
ExceptionHandling.cs (2)
168|| e is IOException; 295|| e is IOException
FileUtilities.cs (1)
965catch (Exception ex) when (ex is IOException || ex is UnauthorizedAccessException)
Microsoft.Build.Engine.UnitTests (2)
FileUtilities_Tests.cs (2)
859Assert.Throws<IOException>(() => 873Assert.Throws<IOException>(() =>
Microsoft.Build.Framework (1)
EncodingUtilities.cs (1)
281catch (Exception ex) when (ex is IOException || ex is SecurityException)
Microsoft.Build.Tasks.CodeAnalysis (4)
GenerateMSBuildEditorConfig.cs (1)
129catch (IOException ex)
src\Compilers\Shared\BuildServerConnection.cs (2)
402catch (Exception e) when (e is IOException || e is TimeoutException) 687catch (IOException)
Utilities.cs (1)
136e is IOException;
Microsoft.Build.Tasks.Core (18)
BootstrapperUtil\BootstrapperBuilder.cs (5)
375catch (IOException ex) 1054catch (IOException ex) 1487catch (IOException ex) 2008catch (IOException) 2047catch (IOException)
Copy.cs (1)
976case IOException: // Not clear why we can get one and not the other
DownloadFile.cs (1)
257if (actualException is IOException)
ExceptionHandling.cs (2)
168|| e is IOException; 295|| e is IOException
FileIO\WriteLinesToFile.cs (1)
130catch (IOException)
FileMatcher.cs (1)
836catch (IOException) { }
FileUtilities.cs (1)
965catch (Exception ex) when (ex is IOException || ex is UnauthorizedAccessException)
GenerateResource.cs (1)
2755catch (IOException io)
ManifestUtil\ManifestWriter.cs (1)
135catch (IOException)
ManifestUtil\Util.cs (3)
487catch (IOException) 521catch (IOException) 551catch (IOException)
Unzip.cs (1)
271catch (IOException e)
Microsoft.Build.Utilities.Core (5)
ExceptionHandling.cs (2)
168|| e is IOException; 295|| e is IOException
FileMatcher.cs (1)
836catch (IOException) { }
FileUtilities.cs (1)
965catch (Exception ex) when (ex is IOException || ex is UnauthorizedAccessException)
ToolTask.cs (1)
1605catch (Exception e) when (e is Win32Exception || e is IOException || e is UnauthorizedAccessException)
Microsoft.Cci.Extensions (1)
HostEnvironment.cs (1)
458catch (IOException)
Microsoft.CodeAnalysis (63)
AssemblyUtilities.cs (3)
22/// <exception cref="IOException">If the file at <paramref name="filePath"/> does not exist or cannot be accessed.</exception> 58/// <exception cref="IOException">If the files does not exist or cannot be accessed.</exception> 96/// <exception cref="IOException">If the file at <paramref name="assemblyPath"/> does not exist or cannot be accessed.</exception>
AssemblyUtilitiesCore.cs (1)
25/// <exception cref="IOException">If the file at <paramref name="filePath"/> does not exist or cannot be accessed.</exception>
CodeGen\PermissionSetAttribute.cs (1)
106catch (IOException e)
CommandLine\CommandLineArguments.cs (1)
435catch (Exception e) when (diagnosticsOpt != null && (e is BadImageFormatException || e is IOException))
CommandLine\CommonCompiler.CompilerEmitStreamProvider.cs (1)
59catch (IOException e)
CommandLine\CommonCompiler.ExistingReferencesResolver.cs (1)
63catch (Exception e) when (e is BadImageFormatException || e is IOException)
Compilation.EmitStream.cs (2)
150catch (IOException e) 197catch (IOException ex)
Compilation\Compilation.cs (1)
2026catch (IOException ex)
Compilation\SourceReferenceResolver.cs (1)
46/// <exception cref="IOException">Error reading file <paramref name="resolvedPath"/>. See <see cref="Exception.InnerException"/> for details.</exception>
Compilation\XmlReferenceResolver.cs (1)
36/// <exception cref="IOException">Error reading file <paramref name="resolvedPath"/>. See <see cref="Exception.InnerException"/> for details.</exception>
DiagnosticAnalyzer\AnalyzerFileReference.cs (1)
224/// <exception cref="IOException">IO error reading the metadata.</exception>
DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (1)
130catch (IOException)
DocumentationComments\DocumentationCommentIncludeCache.cs (1)
46/// <exception cref="IOException"></exception>
EmbeddedText.cs (2)
134/// <exception cref="IOException">An I/O error occurs.</exception> 173/// <exception cref="IOException">An I/O error occurs.</exception>
Emit\EditAndContinue\DefinitionMap.cs (3)
294catch (Exception e) when (e is InvalidDataException or IOException or BadImageFormatException) 379catch (Exception e) when (e is UnsupportedSignatureContent || e is BadImageFormatException || e is IOException) 695catch (Exception e) when (e is InvalidDataException or IOException or BadImageFormatException)
Emit\EditAndContinue\EmitBaseline.cs (5)
105/// This exception and <see cref="IOException"/> are caught and converted to an emit diagnostic. Other exceptions are passed through. 110/// This exception and <see cref="IOException"/> are caught and converted to an emit diagnostic. Other exceptions are passed through. 135/// <exception cref="IOException">Error reading module metadata.</exception> 265/// This exception and <see cref="IOException"/> are caught and converted to an emit diagnostic. Other exceptions are passed through. 274/// This exception and <see cref="IOException"/> are caught and converted to an emit diagnostic. Other exceptions are passed through.
EncodedStringText.cs (2)
71/// <exception cref="IOException">An IO error occurred while reading from the stream.</exception> 126/// <exception cref="IOException">Error reading from stream.</exception>
FileKey.cs (1)
37/// <exception cref="IOException"/>
FileSystem\FileUtilities.cs (11)
245/// <exception cref="IOException"/> 300catch (IOException) 328catch (Exception e) when (e is not IOException) 345catch (Exception e) when (e is not IOException) 383catch (IOException) 393/// <exception cref="IOException"/> 401catch (IOException) 411/// <exception cref="IOException"/> 420catch (IOException) 430/// <exception cref="IOException"/> 445catch (IOException)
FileSystem\ICommonCompilerFileSystem.cs (2)
26/// Open a file and ensure common exception types are wrapped to <see cref="IOException"/>. 42catch (IOException)
FileSystemExtensions.cs (1)
31/// <exception cref="IOException">An error occurred while reading or writing a file.</exception>
MetadataReference\AssemblyMetadata.cs (6)
50/// Shall only throw <see cref="BadImageFormatException"/> or <see cref="IOException"/>. 160/// <exception cref="IOException">Error reading file <paramref name="path"/>. See <see cref="Exception.InnerException"/> for details.</exception> 277/// <exception cref="IOException">IO error reading the metadata. See <see cref="Exception.InnerException"/> for details.</exception> 303/// <exception cref="IOException">IO error while reading the metadata. See <see cref="Exception.InnerException"/> for details.</exception> 311/// <exception cref="IOException">IO error while reading the metadata. See <see cref="Exception.InnerException"/> for details.</exception> 406/// <exception cref="IOException">IO error reading the metadata. See <see cref="Exception.InnerException"/> for details.</exception>
MetadataReference\MetadataReference.cs (2)
182/// <exception cref="IOException">An error occurred while reading the stream.</exception> 224/// <exception cref="IOException">An error occurred while reading the file.</exception>
MetadataReference\ModuleMetadata.cs (2)
205/// <exception cref="IOException"> 257/// <exception cref="IOException">Error opening file <paramref name="path"/>. See <see cref="Exception.InnerException"/> for details.</exception>
MetadataReference\PortableExecutableReference.cs (3)
136/// <exception cref="IOException">The metadata image content can't be read.</exception> 166/// <exception cref="IOException">The metadata image content can't be read.</exception> 179/// <exception cref="IOException">The metadata image content can't be read.</exception>
ReferenceManager\CommonReferenceManager.Resolution.cs (2)
472/// If any of the following exceptions: <see cref="BadImageFormatException"/>, <see cref="FileNotFoundException"/>, <see cref="IOException"/>, 503catch (Exception e) when (e is BadImageFormatException || e is IOException)
RuleSet\RuleSet.cs (1)
320catch (IOException e)
StrongName\DesktopStrongNameProvider.cs (1)
224/// <exception cref="IOException"/>
StrongName\StrongNameKeys.cs (1)
115catch (IOException ex)
Text\SourceText.cs (2)
178/// <exception cref="IOException">An I/O error occurs.</exception> 1288/// <exception cref="IOException">Stream is so big that max char count can't fit in <see cref="int"/>.</exception>
Microsoft.CodeAnalysis.Analyzers (2)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
29/// <exception cref="IOException">Exception while performing any I/O on given file paths.</exception> 46/// <exception cref="IOException">Exception while performing any I/O on given file paths.</exception>
Microsoft.CodeAnalysis.AnalyzerUtilities (2)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
29/// <exception cref="IOException">Exception while performing any I/O on given file paths.</exception> 46/// <exception cref="IOException">Exception while performing any I/O on given file paths.</exception>
Microsoft.CodeAnalysis.BannedApiAnalyzers (2)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
29/// <exception cref="IOException">Exception while performing any I/O on given file paths.</exception> 46/// <exception cref="IOException">Exception while performing any I/O on given file paths.</exception>
Microsoft.CodeAnalysis.CodeStyle (13)
src\Compilers\Core\Portable\EncodedStringText.cs (2)
71/// <exception cref="IOException">An IO error occurred while reading from the stream.</exception> 126/// <exception cref="IOException">Error reading from stream.</exception>
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (11)
245/// <exception cref="IOException"/> 300catch (IOException) 328catch (Exception e) when (e is not IOException) 345catch (Exception e) when (e is not IOException) 383catch (IOException) 393/// <exception cref="IOException"/> 401catch (IOException) 411/// <exception cref="IOException"/> 420catch (IOException) 430/// <exception cref="IOException"/> 445catch (IOException)
Microsoft.CodeAnalysis.CSharp (2)
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (1)
343catch (IOException e)
CSharpFileSystemExtensions.cs (1)
30/// <exception cref="IOException">An error occurred while reading or writing a file.</exception>
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Emit\EditAndContinue\EditAndContinueTests.cs (1)
12917[InlineData(typeof(IOException))]
Microsoft.CodeAnalysis.Features (4)
Completion\Providers\ImportCompletionProvider\AbstractTypeImportCompletionService.cs (1)
79catch (Exception ex) when (ex is BadImageFormatException or IOException)
DesignerAttribute\DesignerAttributeDiscoveryService.cs (1)
91catch (Exception ex) when (ex is BadImageFormatException or IOException)
Emit\CompilationOutputFilesWithImplicitPdbPath.cs (1)
95catch (Exception e) when (e is not IOException)
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (1)
240catch (IOException)
Microsoft.CodeAnalysis.InteractiveHost (11)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (11)
245/// <exception cref="IOException"/> 300catch (IOException) 328catch (Exception e) when (e is not IOException) 345catch (Exception e) when (e is not IOException) 383catch (IOException) 393/// <exception cref="IOException"/> 401catch (IOException) 411/// <exception cref="IOException"/> 420catch (IOException) 430/// <exception cref="IOException"/> 445catch (IOException)
Microsoft.CodeAnalysis.LanguageServer (4)
HostWorkspace\MetadataService.cs (3)
41catch (IOException ex) 49private readonly IOException _ex; 51public ThrowingExecutableReference(string resolvedPath, MetadataReferenceProperties properties, IOException ex) : base(properties, resolvedPath)
Program.cs (1)
29catch (IOException)
Microsoft.CodeAnalysis.PublicApiAnalyzers (2)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
29/// <exception cref="IOException">Exception while performing any I/O on given file paths.</exception> 46/// <exception cref="IOException">Exception while performing any I/O on given file paths.</exception>
Microsoft.CodeAnalysis.Remote.Workspaces (1)
RemoteCallback.cs (1)
209if (exception is IOException)
Microsoft.CodeAnalysis.ResxSourceGenerator (2)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
29/// <exception cref="IOException">Exception while performing any I/O on given file paths.</exception> 46/// <exception cref="IOException">Exception while performing any I/O on given file paths.</exception>
Microsoft.CodeAnalysis.Scripting (3)
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (3)
229/// <exception cref="IOException">Error reading file <paramref name="fullPath"/>. See <see cref="Exception.InnerException"/> for details.</exception> 287/// <exception cref="IOException">Error reading file <paramref name="fullPath"/>. See <see cref="Exception.InnerException"/> for details.</exception> 524catch (IOException)
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (1)
MetadataShadowCopyProviderTests.cs (1)
161Assert.Throws<IOException>(() => File.Delete(sc));
Microsoft.CodeAnalysis.Test.Utilities (5)
CompilationVerifier.cs (2)
209catch (IOException e) 227catch (IOException e)
TempFiles\DisposableFile.cs (1)
42catch (IOException ex)
TempFiles\TempDirectory.cs (1)
42catch (IOException)
TempFiles\TempFile.cs (1)
53catch (IOException)
Microsoft.CodeAnalysis.UnitTests (7)
EmbeddedTextTests.cs (2)
60Assert.Throws<IOException>(() => EmbeddedText.FromStream("path", new HugeStream())); 63Assert.Throws<IOException>(() => EmbeddedText.FromStream("path", new ReadFailsStream()));
InternalUtilities\StreamExtensionsTests.cs (3)
49Assert.Throws<IOException>(() => stream.TryReadAll(null, 0, 1)); 84Assert.Throws<IOException>(() => stream.TryReadAll(destArray, 0, sourceArray.Length)); 109Assert.Throws<IOException>(() => stream.TryReadAll(destArray, 0, sourceArray.Length));
MetadataReferences\ModuleMetadataTests.cs (2)
122Assert.Throws<IOException>(() => ModuleMetadata.CreateFromFile(@"http://goo.bar")); 126Assert.Throws<IOException>(() => ModuleMetadata.CreateFromFile(Environment.GetFolderPath(Environment.SpecialFolder.Windows)));
Microsoft.CodeAnalysis.VisualBasic (3)
CommandLine\VisualBasicCommandLineArguments.vb (1)
105Catch e As IOException
Compilation\DocumentationComments\DocumentationCommentCompiler.Includes.vb (1)
502Catch e As IOException
VisualBasicFileSystemExtensions.vb (1)
28''' <exception cref="IOException">An error occurred while reading or writing a file.</exception>
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
Emit\EditAndContinue\EditAndContinueTests.vb (1)
24<InlineData(GetType(IOException))>
Microsoft.CodeAnalysis.Workspaces (29)
FindSymbols\SymbolTree\SymbolTreeInfo_Metadata.cs (2)
76catch (Exception e) when (e is BadImageFormatException or IOException) 88catch (Exception e) when (e is BadImageFormatException or IOException)
Serialization\SerializerService_Reference.cs (1)
249IOException or
Shared\Utilities\IOUtilities.cs (1)
53return e is IOException or
src\Compilers\Core\Portable\AssemblyUtilitiesCore.cs (1)
25/// <exception cref="IOException">If the file at <paramref name="filePath"/> does not exist or cannot be accessed.</exception>
src\Compilers\Core\Portable\DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (1)
130catch (IOException)
src\Compilers\Core\Portable\EncodedStringText.cs (2)
71/// <exception cref="IOException">An IO error occurred while reading from the stream.</exception> 126/// <exception cref="IOException">Error reading from stream.</exception>
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (11)
245/// <exception cref="IOException"/> 300catch (IOException) 328catch (Exception e) when (e is not IOException) 345catch (Exception e) when (e is not IOException) 383catch (IOException) 393/// <exception cref="IOException"/> 401catch (IOException) 411/// <exception cref="IOException"/> 420catch (IOException) 430/// <exception cref="IOException"/> 445catch (IOException)
TemporaryStorage\TemporaryStorageService.MemoryMappedInfo.cs (2)
104/// Run a function which may fail with an <see cref="IOException"/> if not enough memory is available to satisfy 125catch (IOException)
Workspace\Host\TextFactory\ITextFactoryService.cs (1)
32/// <exception cref="IOException">An IO error occurred while reading from the stream.</exception>
Workspace\Solution\FileTextLoader.cs (2)
99/// <exception cref="IOException"></exception> 193/// <exception cref="IOException"></exception>
Workspace\Solution\TextLoader.cs (5)
57/// <exception cref="IOException" /> 79/// <exception cref="IOException" /> 89/// <exception cref="IOException" /> 108catch (IOException e) 137catch (IOException e)
Microsoft.CodeAnalysis.Workspaces.MSBuild (6)
MSBuild\BuildHostProcessManager.cs (1)
310catch (Exception e) when (e is IOException or XmlException)
MSBuild\MSBuildWorkspace.cs (5)
358catch (IOException exception) 375catch (IOException exception) 441catch (IOException) 505catch (IOException exception) 533catch (IOException exception)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (11)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (11)
245/// <exception cref="IOException"/> 300catch (IOException) 328catch (Exception e) when (e is not IOException) 345catch (Exception e) when (e is not IOException) 383catch (IOException) 393/// <exception cref="IOException"/> 401catch (IOException) 411/// <exception cref="IOException"/> 420catch (IOException) 430/// <exception cref="IOException"/> 445catch (IOException)
Microsoft.DotNet.Arcade.Sdk (1)
src\DownloadFile.cs (1)
210e is IOException && !(e is DirectoryNotFoundException || e is PathTooLongException) ||
Microsoft.DotNet.Build.Tasks.Feed (1)
src\PushToBuildStorage.cs (1)
625|| e is IOException;
Microsoft.DotNet.Build.Tasks.Packaging (1)
GetPackageDescription.cs (1)
105if (excep is IOException || excep is UnauthorizedAccessException)
Microsoft.DotNet.Helix.Client (1)
HelixApi.cs (1)
23exception is IOException ||
Microsoft.DotNet.Helix.Sdk (1)
AzureDevOpsTask.cs (1)
187ex is IOException ||
Microsoft.DotNet.XliffTasks (1)
ExponentialRetry.cs (1)
25catch (IOException e)
Microsoft.Extensions.FileProviders.Physical (5)
Internal\FileSystemInfoHelper.cs (1)
62catch (Exception ex) when (ex is IOException or UnauthorizedAccessException)
PhysicalDirectoryInfo.cs (1)
100catch (Exception ex) when (ex is DirectoryNotFoundException or IOException)
PhysicalFileProvider.cs (1)
335catch (IOException)
PhysicalFilesWatcher.cs (2)
299ex is IOException || 352ex is IOException ||
Microsoft.Extensions.ML (1)
ModelLoaders\FileModelLoader.cs (1)
118catch (IOException)
Microsoft.Maui.Resizetizer (1)
SkiaSharpTools.cs (1)
222 case IOException:
Microsoft.ML.TensorFlow (1)
TensorflowUtils.cs (1)
335catch (IOException e)
Microsoft.VisualBasic.Core (18)
Microsoft\VisualBasic\CompilerServices\ExceptionUtils.vb (1)
383Friend Shared Function GetIOException(ByVal ResourceID As String, ByVal ParamArray PlaceHolders() As String) As IO.IOException
Microsoft\VisualBasic\CompilerServices\IOUtils.vb (1)
67Catch IOex As IOException When _
Microsoft\VisualBasic\CompilerServices\VB6InputFile.vb (1)
42Catch ex As IOException
Microsoft\VisualBasic\CompilerServices\VB6OutputFile.vb (1)
56Catch ex As IOException
Microsoft\VisualBasic\CompilerServices\VB6RandomFile.vb (1)
42Catch ex As IOException
Microsoft\VisualBasic\FileIO\FileSystem.vb (11)
344''' <exception cref="IO.IOException">If the length of the file is larger than Integer.MaxValue (~2GB).</exception> 659''' <exception cref="IO.IOException">If directory points to a root directory. 702''' <exception cref="IO.IOException">If there's an existing directory or an existing file with the same name.</exception> 802Catch ex As IO.IOException 888''' <exception cref="IO.IOException">SourceDirectoryPath and TargetDirectoryPath are the same. 960''' <exception cref="IO.IOException">Some files or directories cannot be copied or moved.</exception> 979Catch ex As IO.IOException 1023If (TypeOf ex Is IO.IOException OrElse TypeOf ex Is UnauthorizedAccessException OrElse 1044If (TypeOf ex Is IO.IOException OrElse TypeOf ex Is UnauthorizedAccessException OrElse 1064If (TypeOf ex Is IO.IOException OrElse TypeOf ex Is UnauthorizedAccessException OrElse 1337If TypeOf ex Is IO.IOException Or
Microsoft\VisualBasic\FileSystem.vb (2)
292Catch ex As IOException 417Catch ex As IOException
Microsoft.VisualBasic.Forms (1)
Microsoft\VisualBasic\Logging\FileLogTraceListener.vb (1)
720Catch ex As IOException
Microsoft.VisualBasic.Tests (12)
Microsoft\VisualBasic\MyServices\FileSystemProxyTests.cs (12)
73Assert.Throws<IOException>(() => _fileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory)); 98Assert.Throws<IOException>(() => _fileSystem.CopyDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite: false)); 136Assert.Throws<IOException>(() => _fileSystem.CopyFile(testFileSource, testFileDest)); 158Assert.Throws<IOException>(() => _fileSystem.CopyFile(testFileSource, testFileDest, overwrite: false)); 226Assert.Throws<IOException>(() => _fileSystem.DeleteDirectory(FullPathToNewDirectory, DeleteDirectoryOption.ThrowIfDirectoryNonEmpty)); 511Assert.Throws<IOException>(() => _fileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory)); 537Assert.Throws<IOException>(() => _fileSystem.MoveDirectory(FullPathToSourceDirectory, FullPathToTargetDirectory, overwrite: false)); 586Assert.Throws<IOException>(() => _fileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath)); 603Assert.Throws<IOException>(() => _fileSystem.MoveFile(SourceFileNameWithPath, DestinationFileNameWithPath, overwrite: false)); 658Assert.Throws<IOException>(() => _fileSystem.RenameDirectory(NewFDirectoryPath, "OriginalDirectory")); 677Assert.Throws<IOException>(() => _fileSystem.RenameFile(NewFileWithPath, "NewFile")); 679Assert.Throws<IOException>(() => _fileSystem.RenameFile(NewFileWithPath, "NewFDirectory"));
Microsoft.VisualStudio.LanguageServices (8)
ProjectSystem\CPS\ITempPECompiler.cs (1)
27/// <exception cref="System.IO.IOException">If the <paramref name="outputFileName"/> could not be written</exception>
ProjectSystem\MetadataReferences\VisualStudioMetadataReferenceManager.cs (3)
155/// <exception cref="IOException"/> 273/// <exception cref="IOException"/> 333/// <exception cref="IOException"/>
ProjectSystem\MetadataReferences\VisualStudioPortableExecutableReference.cs (2)
58catch (IOException e) 94if (e is IOException or BadImageFormatException)
ProjectSystem\VisualStudioWorkspaceImpl.AddMetadataReferenceUndoUnit.cs (1)
45catch (IOException)
src\Compilers\Core\Portable\FileKey.cs (1)
37/// <exception cref="IOException"/>
MSBuild (10)
AutomaticEncodingRestorer.cs (2)
42catch (Exception ex) when (ex is IOException || ex is SecurityException) 61catch (Exception ex) when (ex is IOException || ex is SecurityException)
CommunicationsUtilities.cs (1)
851catch (IOException)
ExceptionHandling.cs (2)
168|| e is IOException; 295|| e is IOException
FileUtilities.cs (1)
965catch (Exception ex) when (ex is IOException || ex is UnauthorizedAccessException)
NodeEndpointOutOfProcBase.cs (1)
447catch (IOException e)
XMake.cs (3)
1938catch (Exception ex) when (ex is IOException || ex is SecurityException) 2300catch (IOException e) 4421catch (IOException e) when (!loggerDescription.IsOptional)
MSBuildTaskHost (5)
CommunicationsUtilities.cs (1)
851catch (IOException)
ExceptionHandling.cs (2)
168|| e is IOException; 295|| e is IOException
FileUtilities.cs (1)
965catch (Exception ex) when (ex is IOException || ex is UnauthorizedAccessException)
NodeEndpointOutOfProcBase.cs (1)
447catch (IOException e)
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
330[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.IOException))]
netstandard (1)
netstandard.cs (1)
931[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.IOException))]
PresentationBuildTasks (2)
Microsoft\Build\Tasks\Windows\GenerateTemporaryTargetAssembly.cs (2)
203catch (IOException e) 318catch (IOException e)
PresentationCore (5)
src\Microsoft.DotNet.Wpf\src\Shared\System\IO\FileHelper.cs (2)
132catch (Exception e) when (retries > 0 && (e is IOException || e is UnauthorizedAccessException)) 156catch(System.IO.IOException)
System\Windows\Input\Cursor.cs (1)
261catch(System.IO.IOException)
System\Windows\Input\Stylus\Common\StylusLogic.cs (1)
287catch (Exception e) when (e is IOException)
System\Windows\Media\FontFamily.cs (1)
524catch (IOException)
PresentationFramework (8)
MS\Internal\IO\Packaging\PackageFilter.cs (2)
184catch (IOException) 395catch (IOException)
MS\Internal\IO\Packaging\UnsafeIndexingFilterStream.cs (1)
112catch (IOException ioException)
MS\Internal\IO\Packaging\XpsFilter.cs (2)
421catch (IOException ex) 550catch (IOException ex)
System\Windows\Navigation\NavigationService.cs (2)
2652catch (IOException e) 2830catch (IOException e)
System\Windows\ResourceDictionary.cs (1)
176catch (System.IO.IOException)
PresentationUI (10)
MS\Internal\Documents\Application\DocumentProperties.cs (1)
309catch (IOException)
MS\Internal\Documents\Application\DocumentStream.cs (3)
431catch (IOException ioe) 551catch (IOException) 756catch (IOException io)
MS\Internal\Documents\Application\FileController.cs (3)
81catch (IOException ioe) 127catch (IOException ioe) 347catch (IOException ioe)
MS\Internal\Documents\Application\RightsManagementErrorHandler.cs (1)
269(exception is System.IO.IOException) ||
MS\Internal\Documents\Application\WriteableOnDemandPackagePart.cs (1)
170/// <exception cref="System.IO.IOException" />
MS\Internal\Documents\Application\WriteableOnDemandStream.cs (1)
272/// <exception cref="System.IO.IOException" />
ReachFramework (1)
AlphaFlattener\Flattener.cs (1)
1069catch (System.IO.IOException e)
Replay (2)
src\Compilers\Shared\BuildServerConnection.cs (2)
402catch (Exception e) when (e is IOException || e is TimeoutException) 687catch (IOException)
Roslyn.Diagnostics.Analyzers (2)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
29/// <exception cref="IOException">Exception while performing any I/O on given file paths.</exception> 46/// <exception cref="IOException">Exception while performing any I/O on given file paths.</exception>
Roslyn.Test.PdbUtilities (1)
EditAndContinue\EditAndContinueTestUtilities.cs (1)
27catch (Exception e) when (e is BadImageFormatException or IOException)
RulesetToEditorconfigConverter (3)
Program.cs (1)
23catch (IOException ex)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
29/// <exception cref="IOException">Exception while performing any I/O on given file paths.</exception> 46/// <exception cref="IOException">Exception while performing any I/O on given file paths.</exception>
Sockets.BindTests (6)
src\Servers\Kestrel\test\BindTests\AddressRegistrationTests.cs (6)
556var exception = Assert.Throws<IOException>(() => host.Start()); 591var exception = Assert.Throws<IOException>(() => host.Start()); 973var exception = Assert.Throws<IOException>(() => host.Start());
Sockets.FunctionalTests (4)
src\Servers\Kestrel\test\FunctionalTests\ConnectionMiddlewareTests.cs (1)
31await Assert.ThrowsAnyAsync<IOException>(async () =>
src\Servers\Kestrel\test\FunctionalTests\RequestTests.cs (2)
894catch (IOException) 1149await Assert.ThrowsAnyAsync<IOException>(() => readTcs.Task).DefaultTimeout();
src\Servers\Kestrel\test\FunctionalTests\ResponseTests.cs (1)
1112catch (IOException)
System.CodeDom (1)
src\libraries\Common\src\System\IO\TempFileCollection.cs (1)
142catch (IOException ex)
System.Configuration.ConfigurationManager (2)
src\libraries\Common\src\System\IO\TempFileCollection.cs (1)
142catch (IOException ex)
System\Configuration\Internal\WriteFileContext.cs (1)
143catch (IOException)
System.Diagnostics.Process (6)
src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcFsStat.ParseMapModules.cs (1)
28catch (IOException) { }
src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcFsStat.TryReadStatusFile.cs (2)
170catch (Exception ex) when (ex is IOException || ex.InnerException is IOException)
System\Diagnostics\AsyncStreamReader.cs (1)
105catch (IOException)
System\Diagnostics\Process.Linux.cs (1)
332catch (IOException)
System\Diagnostics\ProcessManager.Linux.cs (1)
139catch (IOException)
System.Diagnostics.StackTrace (1)
System\Diagnostics\StackTraceSymbols.cs (1)
212catch (Exception e) when (e is BadImageFormatException || e is IOException)
System.Diagnostics.TextWriterTraceListener (1)
System\Diagnostics\TextWriterTraceListener.cs (1)
239catch (IOException)
System.Drawing.Common.Tests (5)
System\Drawing\IconTests.cs (5)
367catch (IOException) 793Assert.Throws<IOException>(() => { Icon.ExtractIcon(string.Empty, 0, 16); }); 794Assert.Throws<IOException>(() => { Icon.ExtractIcon(string.Empty, 0); }); 810Assert.Throws<IOException>(() => 815Assert.Throws<IOException>(() =>
System.Formats.Nrbf (2)
System\Formats\Nrbf\NrbfDecoder.cs (2)
54/// <exception cref="IOException">An I/O error occurred.</exception> 104/// <exception cref="IOException">An I/O error occurred.</exception>
System.Formats.Tar (17)
System\Formats\Tar\TarEntry.cs (3)
191/// <exception cref="IOException"><para>The parent directory of <paramref name="destinationFileName"/> does not exist.</para> 221/// <exception cref="IOException"><para>The parent directory of <paramref name="destinationFileName"/> does not exist.</para> 252/// <exception cref="IOException">An I/O problem occurred.</exception>
System\Formats\Tar\TarFile.cs (8)
30/// <exception cref="IOException">An I/O exception occurred.</exception> 65/// <exception cref="IOException">An I/O exception occurred.</exception> 100/// <exception cref="IOException">An I/O exception occurred.</exception> 132/// <exception cref="IOException">An I/O exception occurred.</exception> 170/// <exception cref="IOException">An I/O exception occurred.</exception> 211/// <exception cref="IOException">An I/O exception occurred.</exception> 253/// <exception cref="IOException">An I/O exception occurred.</exception> 296/// <exception cref="IOException">An I/O exception occurred.</exception>
System\Formats\Tar\TarReader.cs (2)
114/// <exception cref="IOException">An I/O problem occurred.</exception> 174/// <exception cref="IOException">An I/O problem occurred.</exception>
System\Formats\Tar\TarWriter.cs (4)
135/// <exception cref="IOException">An I/O problem occurred.</exception> 151/// <exception cref="IOException">An I/O problem occurred.</exception> 219/// <exception cref="IOException">An I/O problem occurred.</exception> 263/// <exception cref="IOException">An I/O problem occurred.</exception>
System.IO (1)
System.IO.cs (1)
5[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.IOException))]
System.IO.Compression (5)
System\IO\Compression\ZipArchive.Async.cs (1)
266catch (IOException ex)
System\IO\Compression\ZipArchive.cs (1)
643catch (IOException ex)
System\IO\Compression\ZipArchiveEntry.Async.cs (1)
19/// <exception cref="IOException">The entry is already currently open for writing. -or- The entry has been deleted from the archive. -or- The archive that this entry belongs to was opened in ZipArchiveMode.Create, and this entry has already been written to once.</exception>
System\IO\Compression\ZipArchiveEntry.cs (2)
320/// <exception cref="IOException">The entry is already open for reading or writing.</exception> 345/// <exception cref="IOException">The entry is already currently open for writing. -or- The entry has been deleted from the archive. -or- The archive that this entry belongs to was opened in ZipArchiveMode.Create, and this entry has already been written to once.</exception>
System.IO.Compression.Brotli (3)
System\IO\Compression\dec\BrotliStream.Decompress.cs (1)
93/// <exception cref="System.IO.IOException">The method tried to read asynchronously past the end of the stream, or a disk error occurred.</exception>
System\IO\Compression\enc\BrotliEncoder.cs (1)
23/// <exception cref="System.IO.IOException">Failed to create the <see cref="System.IO.Compression.BrotliEncoder" /> instance.</exception>
System\IO\Compression\enc\BrotliStream.Compress.cs (1)
107/// <exception cref="System.IO.IOException">The method tried to write asynchronously past the end of the stream, or a disk error occurred.</exception>
System.IO.Compression.ZipFile (52)
System\IO\Compression\ZipFile.Create.Async.cs (12)
24/// <exception cref="IOException">An unspecified I/O error occurred while opening the file.</exception> 48/// <exception cref="IOException">An unspecified I/O error occurred while opening the file.</exception> 87/// <exception cref="IOException">An unspecified I/O error occurred while opening the file.</exception> 204/// <exception cref="IOException"><code>destinationArchiveFileName</code> already exists. 248/// <exception cref="IOException"><code>destinationArchiveFileName</code> already exists. 296/// <exception cref="IOException"><code>destinationArchiveFileName</code> already exists. 348/// If a file in the directory cannot be added to the archive, the archive is left incomplete and invalid, and the method throws an <see cref="IOException"/> exception. 357/// <exception cref="IOException">A file in the specified directory could not be opened. 376/// If a file in the directory cannot be added to the archive, the archive is left incomplete and invalid, and the method throws an <see cref="IOException"/> exception. 385/// <exception cref="IOException">A file in the specified directory could not be opened. 406/// If a file in the directory cannot be added to the archive, the archive is left incomplete and invalid, and the method throws an <see cref="IOException"/> exception. 415/// <exception cref="IOException">A file in the specified directory could not be opened.
System\IO\Compression\ZipFile.Create.cs (12)
22/// <exception cref="IOException">An unspecified I/O error occurred while opening the file.</exception> 44/// <exception cref="IOException">An unspecified I/O error occurred while opening the file.</exception> 81/// <exception cref="IOException">An unspecified I/O error occurred while opening the file.</exception> 194/// <exception cref="IOException"><code>destinationArchiveFileName</code> already exists. 236/// <exception cref="IOException"><code>destinationArchiveFileName</code> already exists. 282/// <exception cref="IOException"><code>destinationArchiveFileName</code> already exists. 331/// If a file in the directory cannot be added to the archive, the archive is left incomplete and invalid, and the method throws an <see cref="IOException"/> exception. 340/// <exception cref="IOException">A file in the specified directory could not be opened. 357/// If a file in the directory cannot be added to the archive, the archive is left incomplete and invalid, and the method throws an <see cref="IOException"/> exception. 366/// <exception cref="IOException">A file in the specified directory could not be opened. 385/// If a file in the directory cannot be added to the archive, the archive is left incomplete and invalid, and the method throws an <see cref="IOException"/> exception. 394/// <exception cref="IOException">A file in the specified directory could not be opened.
System\IO\Compression\ZipFile.Extract.Async.cs (8)
30/// <exception cref="IOException">An I/O error has occurred. -or- An archive entry's name is zero-length, contains only whitespace, or contains one or 64/// <exception cref="IOException">An I/O error has occurred. -or- An archive entry's name is zero-length, contains only whitespace, or contains one or 99/// <exception cref="IOException">An I/O error has occurred. -or- An archive entry's name is zero-length, contains only whitespace, or contains one or 155/// <exception cref="IOException">An I/O error has occurred. -or- An archive entry's name is zero-length, contains only whitespace, or contains one or 218/// <exception cref="IOException">The name of an entry in the archive is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character. 249/// <exception cref="IOException">The name of an entry in the archive is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character. 288/// <exception cref="IOException">The name of an entry in the archive is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character. 328/// <exception cref="IOException">The name of an entry in the archive is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character.
System\IO\Compression\ZipFile.Extract.cs (8)
28/// <exception cref="IOException">An I/O error has occurred. -or- An archive entry's name is zero-length, contains only whitespace, or contains one or 60/// <exception cref="IOException">An I/O error has occurred. -or- An archive entry's name is zero-length, contains only whitespace, or contains one or 93/// <exception cref="IOException">An I/O error has occurred. -or- An archive entry's name is zero-length, contains only whitespace, or contains one or 147/// <exception cref="IOException">An I/O error has occurred. -or- An archive entry's name is zero-length, contains only whitespace, or contains one or 204/// <exception cref="IOException">The name of an entry in the archive is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character. 233/// <exception cref="IOException">The name of an entry in the archive is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character. 270/// <exception cref="IOException">The name of an entry in the archive is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character. 308/// <exception cref="IOException">The name of an entry in the archive is <see cref="string.Empty" />, contains only white space, or contains at least one invalid character.
System\IO\Compression\ZipFileExtensions.ZipArchive.Create.Async.cs (2)
32/// <exception cref="IOException">An I/O error occurred while opening the file specified by sourceFileName.</exception> 64/// <exception cref="IOException">An I/O error occurred while opening the file specified by sourceFileName.</exception>
System\IO\Compression\ZipFileExtensions.ZipArchive.Create.cs (2)
32/// <exception cref="IOException">An I/O error occurred while opening the file specified by sourceFileName.</exception> 63/// <exception cref="IOException">An I/O error occurred while opening the file specified by sourceFileName.</exception>
System\IO\Compression\ZipFileExtensions.ZipArchive.Extract.Async.cs (2)
25/// <exception cref="IOException">An archive entry?s name is zero-length, contains only whitespace, or contains one or more invalid 57/// <exception cref="IOException">An archive entry?s name is zero-length, contains only whitespace, or contains one or more invalid
System\IO\Compression\ZipFileExtensions.ZipArchive.Extract.cs (2)
23/// <exception cref="IOException">An archive entry?s name is zero-length, contains only whitespace, or contains one or more invalid 53/// <exception cref="IOException">An archive entry?s name is zero-length, contains only whitespace, or contains one or more invalid
System\IO\Compression\ZipFileExtensions.ZipArchiveEntry.Extract.Async.cs (2)
25/// <exception cref="IOException">An I/O error has occurred. -or- The entry is currently open for writing. 53/// <exception cref="IOException">An I/O error has occurred.
System\IO\Compression\ZipFileExtensions.ZipArchiveEntry.Extract.cs (2)
22/// <exception cref="IOException">An I/O error has occurred. -or- The entry is currently open for writing. 50/// <exception cref="IOException">An I/O error has occurred.
System.IO.FileSystem.Watcher (1)
System\IO\FileSystemWatcher.Linux.cs (1)
461catch (IOException ex) when (ex.HResult == Interop.Error.ENOTDIR.Info().RawErrno)
System.IO.IsolatedStorage (1)
System\IO\IsolatedStorage\IsolatedStorageFile.cs (1)
46catch (IOException)
System.IO.Packaging (34)
System\IO\Packaging\Package.cs (20)
143/// <exception cref="IOException">If package to be created should have readwrite/read access and underlying stream is write only</exception> 144/// <exception cref="IOException">If package to be created should have readwrite/write access and underlying stream is read only</exception> 160/// <exception cref="IOException">If package to be created should have readwrite/read access and underlying stream is write only</exception> 161/// <exception cref="IOException">If package to be created should have readwrite/write access and underlying stream is read only</exception> 182/// <exception cref="IOException">If the package is readonly, it cannot be modified</exception> 204/// <exception cref="IOException">If the package is readonly, it cannot be modified</exception> 255/// <exception cref="IOException">If the package is write only, information cannot be retrieved from it</exception> 279/// <exception cref="IOException">If the package is write only, information cannot be retrieved from it</exception> 304/// <exception cref="IOException">If the package is readonly, it cannot be modified</exception> 382/// <exception cref="IOException">If the package is writeonly, no information can be retrieved from it</exception> 532/// <exception cref="IOException">If the package is readonly, it cannot be modified</exception> 572/// <exception cref="IOException">If the package is readonly, it cannot be modified</exception> 594/// <exception cref="IOException">If the package is readonly, it cannot be modified</exception> 618/// <exception cref="IOException">If the package is readonly, it cannot be modified</exception> 641/// <exception cref="IOException">If the package is write only, no information can be retrieved from it</exception> 657/// <exception cref="IOException">If the package is write only, no information can be retrieved from it</exception> 681/// <exception cref="IOException">If the package is write only, no information can be retrieved from it</exception> 703/// <exception cref="IOException">If the package is write only, no information can be retrieved from it</exception> 914/// <exception cref="IOException">If package to be created should have readwrite/read access and underlying stream is write only</exception> 915/// <exception cref="IOException">If package to be created should have readwrite/write access and underlying stream is read only</exception>
System\IO\Packaging\PackagePart.cs (14)
264/// <exception cref="IOException">If the subclass fails to provide a non-null stream object</exception> 283/// <exception cref="IOException">If FileAccess.Read is provided and FileMode values are any of the following - 285/// <exception cref="IOException">If the mode and access for the Package and the Stream are not compatible</exception> 286/// <exception cref="IOException">If the subclass fails to provide a non-null stream object</exception> 307/// <exception cref="IOException">If FileAccess.Read is provided and FileMode values are any of the following - 309/// <exception cref="IOException">If the mode and access for the Package and the Stream are not compatible</exception> 310/// <exception cref="IOException">If the subclass fails to provide a non-null stream object</exception> 370/// <exception cref="IOException">If the package is readonly, it cannot be modified</exception> 394/// <exception cref="IOException">If the package is readonly, it cannot be modified</exception> 419/// <exception cref="IOException">If the package is readonly, it cannot be modified</exception> 443/// <exception cref="IOException">If the package is write only, no information can be retrieved from it</exception> 461/// <exception cref="IOException">If the package is write only, no information can be retrieved from it</exception> 486/// <exception cref="IOException">If the package is write only, no information can be retrieved from it</exception> 509/// <exception cref="IOException">If the package is write only, no information can be retrieved from it</exception>
System.IO.Pipes (1)
System\IO\Pipes\PipeStream.Unix.cs (1)
332private IOException GetIOExceptionForSocketException(SocketException e)
System.IO.Ports (2)
System\IO\Ports\SerialStream.Unix.cs (2)
631catch (IOException) when (dtrEnable == false) 653catch (IOException) when (rtsEnable == false)
System.Net.Http (3)
System\Net\Http\HttpContent.cs (1)
674internal static bool StreamCopyExceptionNeedsWrapping(Exception e) => e is IOException || e is ObjectDisposedException;
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (1)
2069catch (Exception e) when (e is IOException || e is ObjectDisposedException || e is InvalidOperationException)
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (1)
928if (exception is IOException ioe)
System.Net.HttpListener (4)
System\Net\Managed\HttpRequestStream.Managed.cs (1)
196catch (IOException e) when (e.InnerException is ArgumentException || e.InnerException is InvalidOperationException)
System\Net\Managed\HttpResponseStream.Managed.cs (3)
150catch (IOException ex) 242catch (IOException ex) 282catch (IOException ex)
System.Net.Mail (1)
System\Net\Mail\SmtpConnection.cs (1)
157catch (IOException)
System.Net.NetworkInformation (1)
System\Net\NetworkInformation\LinuxIPv4InterfaceProperties.cs (1)
55catch (NetworkInformationException ex) when (ex.InnerException is IOException or UnauthorizedAccessException) { }
System.Net.Requests (6)
System\Net\CommandStream.cs (5)
222catch (IOException) 417catch (IOException) 444catch (IOException) 531catch (IOException) 641catch (IOException)
System\Net\FtpWebRequest.cs (1)
918if (webException.InnerException is IOException ioEx &&
System.Net.Security (4)
System\Net\Security\NegotiateStream.cs (2)
438catch (Exception e) when (!(e is IOException || e is OperationCanceledException)) 552catch (Exception e) when (!(e is IOException || e is OperationCanceledException))
System\Net\Security\SslStream.IO.cs (2)
945if (e is IOException || (e is OperationCanceledException && cancellationToken.IsCancellationRequested)) 984if (e is IOException || (e is OperationCanceledException && cancellationToken.IsCancellationRequested))
System.Net.Sockets (1)
System\Net\Sockets\NetworkStream.cs (1)
719private static IOException WrapException(string resourceFormatString, Exception innerException)
System.Private.CoreLib (33)
src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcFsStat.TryReadStatusFile.cs (2)
170catch (Exception ex) when (ex is IOException || ex.InnerException is IOException)
src\libraries\System.Private.CoreLib\src\System\IO\BinaryReader.cs (1)
464/// <exception cref="IOException">An I/O error occurred.</exception>
src\libraries\System.Private.CoreLib\src\System\IO\Directory.cs (4)
62/// <exception cref="IOException">A new directory cannot be created.</exception> 94catch (IOException) { } 306/// <exception cref="IOException">A file or directory already exists in the location of <paramref name="path"/>. 324/// <exception cref="IOException">The directory on <paramref name="linkPath"/> does not exist.
src\libraries\System.Private.CoreLib\src\System\IO\File.cs (16)
115catch (IOException) { } 206/// <exception cref="IOException"> 238/// <exception cref="IOException"> 319/// <exception cref="IOException"> 350/// <exception cref="IOException"> 431/// <exception cref="IOException"> 462/// <exception cref="IOException"> 648/// <exception cref="IOException">An I/O error occurred while opening the file.</exception> 681/// <exception cref="IOException">An I/O error occurred while opening the file.</exception> 752/// <exception cref="IOException">An I/O error occurred while opening the file.</exception> 778/// <exception cref="IOException">An I/O error occurred while opening the file.</exception> 802/// <exception cref="IOException">An I/O error occurred while opening the file.</exception> 959/// <exception cref="IOException">An I/O error occurred while opening the file.</exception> 992/// <exception cref="IOException">An I/O error occurred while opening the file.</exception> 1422/// <exception cref="IOException">A file or directory already exists in the location of <paramref name="path"/>. 1440/// <exception cref="IOException">The file on <paramref name="linkPath"/> does not exist.
src\libraries\System.Private.CoreLib\src\System\IO\FileSystemInfo.cs (2)
158/// <exception cref="IOException">A file or directory already exists in the location of <see cref="FullName"/>. 173/// <exception cref="IOException">The file or directory does not exist.
src\libraries\System.Private.CoreLib\src\System\IO\Path.cs (1)
105catch (Exception ex) when (ex is ArgumentException or IOException or UnauthorizedAccessException)
src\libraries\System.Private.CoreLib\src\System\IO\Strategies\FileStreamHelpers.cs (1)
52e is IOException ||
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\PosixSignalRegistration.cs (1)
25/// <exception cref="IOException">An error occurred while setting up the signal handling or while installing the handler for the specified signal.</exception>
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.NonAndroid.cs (5)
130catch (Exception ex) when (ex is IOException || ex is OutOfMemoryException) 177catch (IOException) { } 403catch (IOException) { } 449catch (IOException) { } 476catch (IOException) { }
System.Private.Windows.Core (1)
System\Private\Windows\Nrbf\SerializationRecordExtensions.cs (1)
31catch (Exception ex) when (ex is ArgumentException or InvalidCastException or ArithmeticException or IOException or TargetInvocationException)
System.Reflection.Metadata (34)
System\Reflection\Internal\MemoryBlocks\MemoryBlockProvider.cs (3)
15/// <exception cref="IOException">Error while reading from the memory source.</exception> 26/// <exception cref="IOException">Error while reading from the memory source.</exception> 39/// <exception cref="IOException">IO error while reading from the underlying stream.</exception>
System\Reflection\Internal\MemoryBlocks\StreamMemoryBlockProvider.cs (3)
68/// <exception cref="IOException">Error reading from the stream.</exception> 100/// <exception cref="IOException">Error while reading from the stream.</exception> 116/// <exception cref="IOException">IO error while mapping memory or not enough memory to create the mapping.</exception>
System\Reflection\Metadata\MetadataReaderProvider.cs (3)
162/// <exception cref="IOException">Error reading from the stream (only when <see cref="MetadataStreamOptions.PrefetchMetadata"/> is specified).</exception> 241/// <exception cref="IOException">IO error while reading from the underlying stream.</exception> 277/// <exception cref="IOException">IO error while reading from the underlying stream.</exception>
System\Reflection\Metadata\PEReaderExtensions.cs (4)
23/// <exception cref="IOException">IO error while reading from the underlying stream.</exception> 49/// <exception cref="IOException">IO error while reading from the underlying stream.</exception> 63/// <exception cref="IOException">IO error while reading from the underlying stream.</exception> 78/// <exception cref="IOException">IO error while reading from the underlying stream.</exception>
System\Reflection\PortableExecutable\PEHeaders.cs (3)
40/// <exception cref="IOException">Error reading from the stream.</exception> 54/// <exception cref="IOException">Error reading from the stream.</exception> 70/// <exception cref="IOException">Error reading from the stream.</exception>
System\Reflection\PortableExecutable\PEReader.cs (17)
126/// <exception cref="IOException">Error reading from the stream (only when prefetching data).</exception> 154/// <exception cref="IOException">Error reading from the stream (only when prefetching data).</exception> 294/// <exception cref="IOException">Error reading from the stream.</exception> 308/// <exception cref="IOException">Error reading from the stream.</exception> 355/// <exception cref="IOException">IO error while reading from the underlying stream.</exception> 377/// <exception cref="IOException">IO error while reading from the underlying stream.</exception> 451/// <exception cref="IOException">Error reading from the underlying stream.</exception> 462/// <exception cref="IOException">IO error while reading from the underlying stream.</exception> 477/// <exception cref="IOException">IO error while reading from the underlying stream.</exception> 533/// <exception cref="IOException">IO error while reading from the underlying stream.</exception> 602/// <exception cref="IOException">IO error while reading from the underlying stream.</exception> 642/// <exception cref="IOException">IO error while reading from the underlying stream.</exception> 685/// The provider shall throw <see cref="IOException"/> if it fails to open the file due to an unexpected IO error. 709/// <exception cref="IOException">No matching PDB file is found due to an error: An IO error occurred while reading the PE image or the PDB.</exception> 761Debug.Assert(errorToReport is BadImageFormatException || errorToReport is IOException); 779catch (Exception e) when (e is BadImageFormatException || e is IOException) 843catch (Exception e) when (e is BadImageFormatException || e is IOException)
System\Reflection\PortableExecutable\PEReader.EmbeddedPortablePdb.cs (1)
158catch (Exception e) when (e is BadImageFormatException || e is IOException)
System.Resources.Extensions (2)
System\Resources\Extensions\BinaryFormat\BinaryFormattedObject.cs (2)
51catch (Exception ex) when (ex is ArgumentException or InvalidCastException or ArithmeticException or IOException) 72catch (Exception ex) when (ex is ArgumentException or InvalidCastException or ArithmeticException or IOException)
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
314[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.IOException))]
System.Security.Cryptography (10)
src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.cs (6)
76/// <exception cref="IOException"> 244/// <exception cref="IOException"> 306/// <exception cref="IOException"> 478/// <exception cref="IOException"> 530/// <exception cref="IOException"> 660catch (IOException e)
System\Security\Cryptography\X509Certificates\OpenSslCrlCache.cs (1)
252catch (IOException) { }
System\Security\Cryptography\X509Certificates\OpenSslDirectoryBasedStoreProvider.cs (3)
198catch (IOException) // Ignore errors. We verify permissions when we've opened the file. 346catch (IOException e) 402catch (IOException)
System.ServiceModel.NetFramingBase (8)
System\ServiceModel\Channels\Connection.cs (6)
299catch (IOException ioException) 313catch (IOException ioException) 327catch (IOException ioException) 344private Exception ConvertIOException(IOException ioException) 372catch (IOException ioException) 411catch (IOException ioException)
System\ServiceModel\Channels\SslStreamSecurityUpgradeProvider.cs (1)
382catch (IOException ioException)
System\ServiceModel\Channels\WindowsStreamSecurityUpgradeProvider.cs (1)
189catch (IOException ioException)
System.ServiceModel.NetNamedPipe (4)
System\ServiceModel\Channels\PipeConnectionInitiator.cs (4)
284catch(IOException ioe) 319private static Exception CreatePipeNameCannotBeAccessedException(IOException ioe, Uri pipeUri) 332catch(IOException ioe) 432public static string GetErrorString(IOException exception)
System.Threading (1)
System\Threading\ReaderWriterLock.cs (1)
1123/// original type of exception was (for example, <see cref="IO.IOException"/> may be thrown if the system is unable to
System.Windows.Forms (5)
System\Windows\Forms\Controls\ListView\ListView.cs (4)
2439catch (IOException) { } 2945catch (IOException) { } 3106catch (IOException) { } 3131catch (IOException) { }
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (1)
1744catch (IOException e)
System.Windows.Forms.Design (3)
System\ComponentModel\Design\BinaryEditor.BinaryUI.cs (1)
119catch (IOException x)
System\Drawing\Design\ToolboxItem.cs (2)
503catch (IOException) 524catch (IOException)
System.Windows.Forms.Primitives (1)
System\Windows\Forms\Internals\ThemingScope.cs (1)
116catch (Exception e) when (e is UnauthorizedAccessException or IOException)
System.Windows.Forms.Tests (1)
DataStreamFromComStreamTests.cs (1)
19Assert.Throws<IOException>(() => dataStream.Write(new byte[bufferSize], index, count));
Test.Utilities (2)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
29/// <exception cref="IOException">Exception while performing any I/O on given file paths.</exception> 46/// <exception cref="IOException">Exception while performing any I/O on given file paths.</exception>
Text.Analyzers (2)
src\RoslynAnalyzers\Utilities\Compiler\RulesetToEditorconfigConverter.cs (2)
29/// <exception cref="IOException">Exception while performing any I/O on given file paths.</exception> 46/// <exception cref="IOException">Exception while performing any I/O on given file paths.</exception>
vbc (2)
src\Compilers\Shared\BuildServerConnection.cs (2)
402catch (Exception e) when (e is IOException || e is TimeoutException) 687catch (IOException)
VBCSCompiler (2)
src\Compilers\Shared\BuildServerConnection.cs (2)
402catch (Exception e) when (e is IOException || e is TimeoutException) 687catch (IOException)
WindowsBase.Tests (1)
System\IO\Packaging\EncryptedPackageEnvelopeTests.cs (1)
27Assert.Throws<IOException>(() => EncryptedPackageEnvelope.Open(stream));