364 instantiations of InvalidDataException
AnalyzerRunner (5)
DiagnosticAnalyzerRunner.cs (1)
301throw new InvalidDataException($"Cannot find {path}.");
Options.cs (4)
141string ReadValue() => (i < args.Length) ? args[i++] : throw new InvalidDataException($"Missing value for option {arg}"); 206throw new InvalidDataException((arg.StartsWith("/", StringComparison.Ordinal) 217throw new InvalidDataException("Missing analyzer path"); 222throw new InvalidDataException("Missing solution path");
Aspire.Hosting (1)
Dcp\DcpExecutor.cs (1)
731throw new InvalidDataException($"Service {svc.Metadata.Name} should have valid address at this point");
dotnet-svcutil-lib (21)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BinaryMessageEncoder.cs (4)
441throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataException(SRServiceModel.BinaryEncoderSessionInvalid)); 457throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataException(SRServiceModel.BinaryEncoderSessionMalformed)); 463throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataException(SRServiceModel.BinaryEncoderSessionMalformed)); 494throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataException(SRServiceModel.BinaryEncoderSessionMalformed));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\FramingDecoders.cs (17)
68throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataException(SRServiceModel.FramingSizeTooLarge)); 166throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataException(SRServiceModel.InvalidDecoderStateMachine)); 216Exception result = new InvalidDataException(string.Format(SRServiceModel.FramingViaTooLong, size)); 230throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataException(string.Format(SRServiceModel.FramingViaNotUri, value), exception)); 256return new InvalidDataException(string.Format(SRServiceModel.FramingFaultTooLong, size)); 328Exception result = new InvalidDataException(string.Format(SRServiceModel.FramingContentTypeTooLong, size)); 393Exception exception = CreateException(new InvalidDataException(string.Format( 429return new InvalidDataException(string.Format(SRServiceModel.FramingRecordTypeMismatch, expectedType.ToString(), foundType.ToString())); 436Exception exception = CreateException(new InvalidDataException(string.Format( 444return CreateException(new InvalidDataException(SRServiceModel.FramingPrematureEOF)); 557CreateException(new InvalidDataException(SRServiceModel.FramingAtEnd))); 561CreateException(new InvalidDataException(SRServiceModel.InvalidDecoderStateMachine))); 784CreateException(new InvalidDataException(SRServiceModel.FramingAtEnd))); 787CreateException(new InvalidDataException(SRServiceModel.InvalidDecoderStateMachine))); 889CreateException(new InvalidDataException(SRServiceModel.FramingAtEnd))); 907CreateException(new InvalidDataException(SRServiceModel.FramingAtEnd))); 910CreateException(new InvalidDataException(SRServiceModel.InvalidDecoderStateMachine)));
GenerateAnalyzerNuspec (1)
Program.cs (1)
261throw new InvalidDataException($"Encountered a file with unexpected extension: {globalconfig}");
IdeBenchmarks (1)
Lsp\LspCompletionSerializationBenchmarks.cs (1)
130throw new InvalidDataException();
InMemory.FunctionalTests (2)
ResponseTests.cs (1)
4970throw new InvalidDataException($"No StatusCode found in '{response}'");
TestTransport\InMemoryHttpClientSlim.cs (1)
114throw new InvalidDataException($"No StatusCode found in '{response}'");
Microsoft.Analyzers.Extra.Tests (1)
Resources\RoslynTestUtils.cs (1)
130throw new InvalidDataException($"Missing end marker for span {index}");
Microsoft.Analyzers.Local.Tests (1)
Resources\RoslynTestUtils.cs (1)
130throw new InvalidDataException($"Missing end marker for span {index}");
Microsoft.Arcade.Common (2)
NupkgInfoFactory.cs (2)
43throw new InvalidDataException(string.Format(CultureInfo.CurrentCulture, "Did not extract nuspec file from package: {0}", path)); 47throw new InvalidDataException(string.Format(CultureInfo.CurrentCulture, "Invalid package: {0}", path), ex);
Microsoft.AspNetCore.Antiforgery.Test (1)
DefaultAntiforgeryTokenStoreTest.cs (1)
321var exception = new InvalidDataException();
Microsoft.AspNetCore.Components.Server (13)
BlazorPack\BlazorPackHubProtocolWorker.cs (1)
65throw new InvalidDataException($"Deserializing object of the `{type.Name}` type for '{field}' failed.", ex);
src\SignalR\common\Protocols.MessagePack\src\Protocol\MessagePackHubProtocolWorker.cs (12)
207throw new InvalidDataException("Invalid invocation result kind."); 302throw new InvalidDataException( 318throw new InvalidDataException("Error binding arguments. Make sure that the types of the provided values match the types of the hub method being invoked.", ex); 419throw new InvalidDataException($"Unexpected message type: {message.GetType().Name}"); 623throw new InvalidDataException($"Reading '{field}' as Boolean failed.", ex); 635throw new InvalidDataException($"Reading '{field}' as Int32 failed.", ex); 647throw new InvalidDataException($"Reading '{field}' as Int64 failed.", ex); 667throw new InvalidDataException($"Reading '{field}' as String failed.", ex); 679throw new InvalidDataException($"Reading '{field}' as String failed.", ex); 691throw new InvalidDataException($"Reading map length for '{field}' failed.", ex); 703throw new InvalidDataException($"Reading array length for '{field}' failed.", ex); 711throw new InvalidDataException($"Null or empty {message}.");
Microsoft.AspNetCore.Http (4)
Features\FormFeature.cs (4)
241throw new InvalidDataException($"Form value count limit {_options.ValueCountLimit} exceeded."); 246throw new InvalidDataException("Form section has invalid Content-Disposition value: " + section.ContentDisposition); 383throw new InvalidDataException("Missing content-type boundary."); 387throw new InvalidDataException($"Multipart boundary length limit {lengthLimit} exceeded.");
Microsoft.AspNetCore.Http.Connections.Common (17)
NegotiateProtocol.cs (10)
229throw new InvalidDataException($"Unexpected token '{reader.TokenType}' when reading negotiation response JSON."); 238throw new InvalidDataException($"Missing required property '{ConnectionIdPropertyName}'."); 245throw new InvalidDataException($"Missing required property '{ConnectionTokenPropertyName}'."); 251throw new InvalidDataException($"Missing required property '{AvailableTransportsPropertyName}'."); 269throw new InvalidDataException("Invalid negotiation response received.", ex); 305throw new InvalidDataException($"Unexpected token '{reader.TokenType}' when reading transfer formats JSON."); 317throw new InvalidDataException($"Missing required property '{TransportPropertyName}'."); 322throw new InvalidDataException($"Missing required property '{TransferFormatsPropertyName}'."); 327throw new InvalidDataException($"Unexpected token '{reader.TokenType}' when reading available transport JSON."); 331throw new InvalidDataException("Unexpected end when reading JSON.");
src\SignalR\common\Shared\SystemTextJsonExtensions.cs (7)
15throw new InvalidDataException("Unexpected end when reading JSON."); 25throw new InvalidDataException($"Unexpected JSON Token Type '{reader.GetTokenString()}'. Expected a JSON Object."); 56throw new InvalidDataException($"Unexpected JSON Token Type '{reader.GetTokenString()}'. Expected a JSON Array."); 68_ => throw new InvalidDataException($"Expected '{propertyName}' to be true or false."), 78throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.String}."); 95throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.Number}."); 112throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.Number}.");
Microsoft.AspNetCore.InternalTesting (1)
HttpClientSlim.cs (1)
140throw new InvalidDataException($"No StatusCode found in '{response}'");
Microsoft.AspNetCore.Mvc.Core.Test (3)
ModelBinding\FormFileValueProviderFactoryTest.cs (1)
64var exception = new InvalidDataException();
ModelBinding\FormValueProviderFactoryTest.cs (1)
52var exception = new InvalidDataException();
ModelBinding\JQueryFormValueProviderFactoryTest.cs (1)
137var exception = new InvalidDataException();
Microsoft.AspNetCore.SignalR.Client.Core (1)
HubConnection.cs (1)
1690throw new InvalidDataException("Connection terminated while reading a message.");
Microsoft.AspNetCore.SignalR.Common (12)
Protocol\HandshakeProtocol.cs (5)
139throw new InvalidDataException("Expected a handshake response from the server."); 156throw new InvalidDataException($"Unexpected token '{reader.TokenType}' when reading handshake response JSON."); 209throw new InvalidDataException($"Unexpected token '{reader.TokenType}' when reading handshake request JSON. Message content: {GetPayloadAsString()}"); 215throw new InvalidDataException($"Missing required property '{ProtocolPropertyName}'. Message content: {GetPayloadAsString()}"); 219throw new InvalidDataException($"Missing required property '{ProtocolVersionPropertyName}'. Message content: {GetPayloadAsString()}");
src\SignalR\common\Shared\SystemTextJsonExtensions.cs (7)
15throw new InvalidDataException("Unexpected end when reading JSON."); 25throw new InvalidDataException($"Unexpected JSON Token Type '{reader.GetTokenString()}'. Expected a JSON Object."); 56throw new InvalidDataException($"Unexpected JSON Token Type '{reader.GetTokenString()}'. Expected a JSON Array."); 68_ => throw new InvalidDataException($"Expected '{propertyName}' to be true or false."), 78throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.String}."); 95throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.Number}."); 112throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.Number}.");
Microsoft.AspNetCore.SignalR.Core (2)
HubConnectionHandler.cs (2)
327throw new InvalidDataException($"The maximum message size of {maxMessageSize}B was exceeded. The message size can be configured in AddHubOptions."); 350throw new InvalidDataException("Connection terminated while reading a message.");
Microsoft.AspNetCore.SignalR.Protocols.Json (35)
Protocol\JsonHubProtocol.cs (28)
164throw new InvalidDataException($"Expected '{TypePropertyName}' to be of type {JsonTokenType.Number}."); 177throw new InvalidDataException( 186newStreamIds.Add(reader.GetString() ?? throw new InvalidDataException($"Null value for '{StreamIdsPropertyName}' is not valid.")); 199throw new InvalidDataException($"Expected '{TargetPropertyName}' to be of type {JsonTokenType.String}."); 293throw new InvalidDataException($"Expected '{ArgumentsPropertyName}' to be of type {SystemTextJsonExtensions.GetTokenString(JsonTokenType.StartArray)}."); 356throw new InvalidDataException($"Missing required property '{TargetPropertyName}'."); 382throw new InvalidDataException($"Missing required property '{TargetPropertyName}'."); 407throw new InvalidDataException($"Missing required property '{InvocationIdPropertyName}'."); 429throw new InvalidDataException($"Missing required property '{InvocationIdPropertyName}'."); 467throw new InvalidDataException($"Missing required property '{TypePropertyName}'."); 477throw new InvalidDataException("Error reading JSON.", jrex); 487throw new InvalidDataException($"Expected '{HeadersPropertyName}' to be of type {JsonTokenType.StartObject}."); 501throw new InvalidDataException($"Expected header '{propertyName}' to be of type {JsonTokenType.String}."); 513throw new InvalidDataException("Unexpected end when reading message headers"); 732throw new InvalidDataException($"Missing required property '{InvocationIdPropertyName}'."); 742throw new InvalidDataException($"Missing required property '{InvocationIdPropertyName}'."); 747throw new InvalidDataException("The 'error' and 'result' properties are mutually exclusive."); 762throw new InvalidDataException($"Missing required property '{InvocationIdPropertyName}'."); 767throw new InvalidDataException($"Missing required property '{ItemPropertyName}'."); 778throw new InvalidDataException($"Missing required property '{InvocationIdPropertyName}'."); 783throw new InvalidDataException($"Missing required property '{ArgumentsPropertyName}'."); 788throw new InvalidDataException($"Missing required property '{TargetPropertyName}'."); 801throw new InvalidDataException($"Missing required property '{TargetPropertyName}'."); 806throw new InvalidDataException($"Missing required property '{ArgumentsPropertyName}'."); 853throw new InvalidDataException("Error binding arguments. Make sure that the types of the provided values match the types of the hub method being invoked.", ex); 867throw new InvalidDataException($"Invocation provides {paramIndex} argument(s) but target expects {paramCount}."); 888throw new InvalidDataException("Missing required property 'sequenceId'."); 898throw new InvalidDataException("Missing required property 'sequenceId'.");
src\SignalR\common\Shared\SystemTextJsonExtensions.cs (7)
15throw new InvalidDataException("Unexpected end when reading JSON."); 25throw new InvalidDataException($"Unexpected JSON Token Type '{reader.GetTokenString()}'. Expected a JSON Object."); 56throw new InvalidDataException($"Unexpected JSON Token Type '{reader.GetTokenString()}'. Expected a JSON Array."); 68_ => throw new InvalidDataException($"Expected '{propertyName}' to be true or false."), 78throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.String}."); 95throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.Number}."); 112throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.Number}.");
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (13)
Protocol\DefaultMessagePackHubProtocolWorker.cs (1)
27throw new InvalidDataException($"Deserializing object of the `{type.Name}` type for '{field}' failed.", ex);
Protocol\MessagePackHubProtocolWorker.cs (12)
207throw new InvalidDataException("Invalid invocation result kind."); 302throw new InvalidDataException( 318throw new InvalidDataException("Error binding arguments. Make sure that the types of the provided values match the types of the hub method being invoked.", ex); 419throw new InvalidDataException($"Unexpected message type: {message.GetType().Name}"); 623throw new InvalidDataException($"Reading '{field}' as Boolean failed.", ex); 635throw new InvalidDataException($"Reading '{field}' as Int32 failed.", ex); 647throw new InvalidDataException($"Reading '{field}' as Int64 failed.", ex); 667throw new InvalidDataException($"Reading '{field}' as String failed.", ex); 679throw new InvalidDataException($"Reading '{field}' as String failed.", ex); 691throw new InvalidDataException($"Reading map length for '{field}' failed.", ex); 703throw new InvalidDataException($"Reading array length for '{field}' failed.", ex); 711throw new InvalidDataException($"Null or empty {message}.");
Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson (39)
Protocol\NewtonsoftJsonHubProtocol.cs (29)
165throw new InvalidDataException($"Missing required property '{TypePropertyName}'."); 178throw new InvalidDataException($"Expected '{StreamIdsPropertyName}' to be of type {JTokenType.Array}."); 186newStreamIds.Add(reader.Value?.ToString() ?? throw new InvalidDataException($"Null value for '{StreamIdsPropertyName}' is not valid.")); 280throw new InvalidDataException($"Expected '{ArgumentsPropertyName}' to be of type {JTokenType.Array}."); 319throw new InvalidDataException($"Missing required property '{SequenceIdPropertyName}'."); 346throw new InvalidDataException($"Missing required property '{TargetPropertyName}'."); 372throw new InvalidDataException($"Missing required property '{TargetPropertyName}'."); 397throw new InvalidDataException($"Missing required property '{InvocationIdPropertyName}'."); 419throw new InvalidDataException($"Missing required property '{InvocationIdPropertyName}'."); 464throw new InvalidDataException($"Missing required property '{TypePropertyName}'."); 474throw new InvalidDataException("Error reading JSON.", jrex); 484throw new InvalidDataException($"Expected '{HeadersPropertyName}' to be of type {JTokenType.Object}."); 498throw new InvalidDataException($"Expected header '{propertyName}' to be of type {JTokenType.String}."); 725throw new InvalidDataException($"Missing required property '{InvocationIdPropertyName}'."); 735throw new InvalidDataException($"Missing required property '{InvocationIdPropertyName}'."); 740throw new InvalidDataException("The 'error' and 'result' properties are mutually exclusive."); 755throw new InvalidDataException($"Missing required property '{InvocationIdPropertyName}'."); 760throw new InvalidDataException($"Missing required property '{ItemPropertyName}'."); 770throw new InvalidDataException($"Missing required property '{InvocationIdPropertyName}'."); 775throw new InvalidDataException($"Missing required property '{ArgumentsPropertyName}'."); 780throw new InvalidDataException($"Missing required property '{TargetPropertyName}'."); 792throw new InvalidDataException($"Missing required property '{TargetPropertyName}'."); 797throw new InvalidDataException($"Missing required property '{ArgumentsPropertyName}'."); 830throw new InvalidDataException($"Invocation provides {argumentsCount} argument(s) but target expects {paramCount}."); 857throw new InvalidDataException("Error binding arguments. Make sure that the types of the provided values match the types of the hub method being invoked.", ex); 879throw new InvalidDataException($"Missing required property '{SequenceIdPropertyName}'."); 889throw new InvalidDataException($"Missing required property '{SequenceIdPropertyName}'."); 901throw new InvalidDataException($"Invocation provides {argCount} argument(s) but target expects {paramCount}."); 923throw new InvalidDataException("Error binding arguments. Make sure that the types of the provided values match the types of the hub method being invoked.", ex);
src\SignalR\common\Shared\JsonUtils.cs (10)
44throw new InvalidDataException($"Unexpected JSON Token Type '{token?.Type}'. Expected a JSON Object."); 56throw new InvalidDataException($"Missing required property '{property}'."); 66throw new InvalidDataException($"Expected '{property}' to be of type {expectedType}."); 93throw new InvalidDataException($"Unexpected JSON Token Type '{GetTokenString(reader.TokenType)}'. Expected a JSON Object."); 101throw new InvalidDataException($"Unexpected JSON Token Type '{GetTokenString(reader.TokenType)}'. Expected a JSON Array."); 111throw new InvalidDataException($"Expected '{propertyName}' to be of type {JTokenType.Boolean}."); 123throw new InvalidDataException($"Expected '{propertyName}' to be of type {JTokenType.Integer}."); 140throw new InvalidDataException($"Expected '{propertyName}' to be of type {JTokenType.Integer}."); 157throw new InvalidDataException($"Expected '{propertyName}' to be of type {JTokenType.String}."); 167throw new InvalidDataException("Unexpected end when reading JSON.");
Microsoft.AspNetCore.SignalR.StackExchangeRedis (8)
Internal\RedisProtocol.cs (1)
281throw new InvalidDataException($"Insufficient items in {messageType} array.");
src\SignalR\common\Shared\SystemTextJsonExtensions.cs (7)
15throw new InvalidDataException("Unexpected end when reading JSON."); 25throw new InvalidDataException($"Unexpected JSON Token Type '{reader.GetTokenString()}'. Expected a JSON Object."); 56throw new InvalidDataException($"Unexpected JSON Token Type '{reader.GetTokenString()}'. Expected a JSON Array."); 68_ => throw new InvalidDataException($"Expected '{propertyName}' to be true or false."), 78throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.String}."); 95throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.Number}."); 112throw new InvalidDataException($"Expected '{propertyName}' to be of type {JsonTokenType.Number}.");
Microsoft.AspNetCore.WebUtilities (14)
BufferedReadStream.cs (1)
405throw new InvalidDataException($"Line length limit {lengthLimit} exceeded.");
FormPipeReader.cs (5)
318throw new InvalidDataException( 328throw new InvalidDataException( 337throw new InvalidDataException( 382throw new InvalidDataException($"Form value count limit {ValueCountLimit} exceeded."); 409throw new InvalidDataException("The form value contains invalid characters.", ex);
FormReader.cs (2)
247throw new InvalidDataException($"Form key or value length limit {limit} exceeded."); 323throw new InvalidDataException($"Form value count limit {ValueCountLimit} exceeded.");
MultipartReader.cs (3)
115throw new InvalidDataException($"Multipart headers length limit {HeadersLengthLimit} exceeded."); 121throw new InvalidDataException($"Invalid header line: {line}"); 129throw new InvalidDataException($"Multipart headers count limit {HeadersCountLimit} exceeded.");
MultipartReaderStream.cs (2)
155throw new InvalidDataException($"Multipart header length limit {lengthLimit} exceeded. Too much data before the first boundary."); 159throw new InvalidDataException($"Multipart body length limit {lengthLimit} exceeded.");
StreamHelperExtensions.cs (1)
69throw new InvalidDataException($"The stream exceeded the data limit {limit.GetValueOrDefault()}.");
Microsoft.Build (7)
BackEnd\Components\Scheduler\SchedulingPlan.cs (2)
376throw new InvalidDataException("Too few values in hierarchy"); 406throw new InvalidDataException("Too few values in build plan.");
Logging\BinaryLogger\BuildEventArgsReader.cs (4)
294throw new InvalidDataException(msgFactory(), innerException); 446error => throw new InvalidDataException(error)); 509throw new InvalidDataException( 1720throw new InvalidDataException(
Logging\BinaryLogger\Postprocessing\StreamExtensions.cs (1)
49throw new InvalidDataException("Unexpected end of stream.");
Microsoft.CodeAnalysis (5)
Emit\EditAndContinueMethodDebugInformation.cs (1)
83throw new InvalidDataException(string.Format(CodeAnalysisResources.InvalidDataAtOffset,
EncodedStringText.cs (1)
112throw new InvalidDataException(e.Message);
Text\LargeText.cs (1)
127throw new InvalidDataException();
Text\SourceText.cs (2)
213throw new InvalidDataException(); 272throw new InvalidDataException();
Microsoft.CodeAnalysis.CodeStyle (1)
src\Compilers\Core\Portable\EncodedStringText.cs (1)
112throw new InvalidDataException(e.Message);
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
Diagnostics\DiagnosticServiceTests.vb (1)
51Throw New InvalidDataException("Bad data!")
Microsoft.CodeAnalysis.Features (5)
EditAndContinue\EditAndContinueMethodDebugInfoReader.cs (2)
82throw new InvalidDataException(e.Message, e); 104throw new InvalidDataException(e.Message, e);
PdbSourceDocument\SourceLinkMap.cs (3)
75throw new InvalidDataException(); 88throw new InvalidDataException(); 96throw new InvalidDataException();
Microsoft.CodeAnalysis.Rebuild (5)
CompilationFactory.cs (1)
40var language => throw new InvalidDataException($"{assemblyFileName} has unsupported language {language}")
CompilationOptionsReader.cs (3)
227throw new InvalidDataException(); 384throw new InvalidDataException(string.Format(RebuildResources.Unexpected_value_for_EmbedInteropTypes_MetadataImageKind_0, embedInteropTypesAndKind)); 468throw new InvalidDataException(RebuildResources.Encountered_null_or_empty_key_for_compilation_options_pairs);
Extensions.cs (1)
20throw new InvalidDataException(string.Format(RebuildResources.Encountered_unexpected_byte_0_when_expecting_a_null_terminator, b));
Microsoft.CodeAnalysis.Test.Utilities (2)
Metadata\MetadataReaderUtils.cs (1)
298throw new InvalidDataException();
SourceGeneration\TestGenerators.cs (1)
156public override SourceText GetText(CancellationToken cancellationToken = default) => throw new InvalidDataException("Binary content not supported");
Microsoft.CodeAnalysis.Workspaces (2)
src\Compilers\Core\Portable\EncodedStringText.cs (1)
112throw new InvalidDataException(e.Message);
Workspace\Solution\FileTextLoader.cs (1)
253throw new InvalidDataException(message);
Microsoft.DotNet.Build.Tasks.Installers (8)
src\ArReader.cs (2)
28throw new InvalidDataException("Invalid archive magic"); 69throw new InvalidDataException("Invalid archive magic");
src\CpioReader.cs (1)
30throw new InvalidDataException("Invalid header magic");
src\RpmHeader.cs (3)
97throw new InvalidDataException("Invalid RPM header magic"); 104throw new InvalidDataException("Unsupported RPM header version"); 109throw new InvalidDataException("Invalid RPM header reserved bytes");
src\RpmLead.cs (1)
30throw new InvalidDataException("Invalid RPM magic");
src\RpmPackage.cs (1)
32throw new InvalidDataException("Unsupported payload compressor");
Microsoft.DotNet.Build.Tasks.Packaging (3)
NugetPropertyStringProvider.cs (3)
49throw new InvalidDataException($"Nuspec property {propertyString} does not have an \'=\' character in it"); 54throw new InvalidDataException($"Nuspec property {propertyString} does not have a value"); 59throw new InvalidDataException($"Nuspec property {propertyString} does not have a key");
Microsoft.DotNet.Build.Tasks.VisualStudio (1)
OptProf\GetRunSettingsSessionConfiguration.cs (1)
91throw new InvalidDataException(
Microsoft.DotNet.NuGetRepack.Tasks (10)
src\NuGetVersionUpdater.cs (10)
152throw new InvalidDataException($"'{packagePath}' has invalid nuspec: missing 'metadata' element"); 158throw new InvalidDataException($"'{packagePath}' has invalid nuspec: missing 'id' element"); 165throw new InvalidDataException($"'{packagePath}' has invalid nuspec: missing 'version' element"); 170throw new InvalidDataException($"'{packagePath}' has invalid nuspec: invalid 'version' value '{packageVersionStr}'"); 231throw new InvalidDataException($"'{packagePath}' is missing .nuspec file"); 236throw new InvalidDataException($"Multiple packages of name '{packageId}' specified"); 300throw new InvalidDataException($"'{package.Id}' has invalid format: element 'dependency' is missing 'id' attribute"); 306throw new InvalidDataException($"'{package.Id}' has invalid format: element 'dependency' is missing 'version' attribute"); 311throw new InvalidDataException($"'{id}' has invalid version range: '{versionRangeAttribute.Value}'"); 319throw new InvalidDataException($"Unexpected dependency version range: '{id}, {versionRangeAttribute.Value}'");
Microsoft.DotNet.SignCheckLibrary (1)
Verification\MachOVerifier.cs (1)
35throw new InvalidDataException($"File {path} is not a valid Mach-O file.");
Microsoft.DotNet.VersionTools.Cli.Tests (1)
VersionTrimmingOperationTests.cs (1)
95nupkgInfoFactory.Setup(m => m.CreateNupkgInfo(It.IsAny<string>())).Throws(new InvalidDataException()).Verifiable();
Microsoft.Extensions.Configuration.FileExtensions (1)
FileConfigurationProvider.cs (1)
107var exception = new InvalidDataException(SR.Format(SR.Error_FailedToLoad, file.PhysicalPath), ex);
Microsoft.Maui.Controls (1)
Shapes\PathFigureCollectionConverter.cs (1)
684 throw new InvalidDataException($"Value is not of type {nameof(PathFigureCollection)}");
Microsoft.Maui.Resizetizer (2)
ResizeImageInfo.cs (2)
104 throw new InvalidDataException($"Unable to parse color value '{tintColor}' for '{info.Filename}'."); 109 throw new InvalidDataException($"Unable to parse color value '{color}' for '{info.Filename}'.");
Microsoft.ML.Parquet (2)
ParquetLoader.cs (2)
167throw new InvalidDataException("Cannot read Parquet file", ex); 227throw new InvalidDataException("Cannot read Parquet file", ex);
Microsoft.ML.TorchSharp (1)
Utils\FileUtils.cs (1)
58throw new InvalidDataException(
PresentationFramework (1)
MS\Internal\Annotations\Component\HighlightComponent.cs (1)
594throw new InvalidDataException(SR.MissingAnnotationHighlightLayer);
PresentationUI (1)
MS\Internal\Documents\Application\DocumentStream.cs (1)
958throw new InvalidDataException(
ReachFramework (9)
Packaging\XpsFixedDocumentReaderWriter.cs (1)
1043throw new InvalidDataException(SR.ReachPackaging_MoreThanOneDocStructure);
Packaging\XpsFixedPageReaderWriter.cs (1)
1579throw new InvalidDataException(SR.ReachPackaging_MoreThanOneStoryFragment);
Packaging\XpsManager.cs (7)
579throw new InvalidDataException(SR.ReachPackaging_InvalidDocUri); 591throw new InvalidDataException(SR.ReachPackaging_MoreThanOneSigDefParts); 651throw new InvalidDataException(SR.ReachPackaging_MoreThanOneThumbnailPart); 671throw new InvalidDataException(SR.ReachPackaging_InvalidDocUri); 683throw new InvalidDataException(SR.ReachPackaging_MoreThanOnePrintTicketPart); 1250throw new InvalidDataException(SR.ReachPackaging_MoreThanOneMetaDataParts); 1415throw new InvalidDataException(SR.ReachPackaging_MoreThanOneStartingParts);
Roslyn.Test.PdbUtilities (1)
EditAndContinue\EditAndContinueTestUtilities.cs (1)
29throw new InvalidDataException(e.Message, e);
System.Diagnostics.Process (1)
src\libraries\Common\src\System\IO\StringParser.cs (1)
326throw new InvalidDataException();
System.Formats.Tar (18)
System\Formats\Tar\TarHeader.Read.cs (6)
204throw new InvalidDataException(SR.Format(SR.TarSizeFieldTooLargeForEntryType, _typeFlag)); 266throw new InvalidDataException(SR.Format(SR.TarSizeFieldTooLargeForEntryType, _typeFlag)); 382throw new InvalidDataException(SR.Format(SR.TarSizeFieldNegative)); 480throw new InvalidDataException(SR.Format(SR.TarPosixFormatExpected, _name)); 498throw new InvalidDataException(SR.Format(SR.TarGnuFormatExpected, _name)); 630throw new InvalidDataException(SR.Format(SR.TarDuplicateExtendedAttribute, name));
System\Formats\Tar\TarHelpers.cs (2)
269throw new InvalidDataException(SR.Format(SR.TarInvalidNumber)); 406throw new InvalidDataException(SR.Format(SR.TarInvalidFormat, archiveFormat));
System\Formats\Tar\TarReader.cs (7)
414throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, actualHeader._typeFlag, TarEntryType.ExtendedAttributes)); 446throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, actualHeader._typeFlag, TarEntryType.ExtendedAttributes)); 452throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, TarEntryType.ExtendedAttributes, TarEntryType.ExtendedAttributes)); 481throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, secondHeader._typeFlag, header._typeFlag)); 499throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, thirdHeader._typeFlag, secondHeader._typeFlag)); 556throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, secondHeader._typeFlag, header._typeFlag)); 575throw new InvalidDataException(SR.Format(SR.TarUnexpectedMetadataEntry, thirdHeader._typeFlag, secondHeader._typeFlag));
System\Formats\Tar\TarWriter.cs (2)
311throw new InvalidDataException(SR.Format(SR.TarInvalidFormat, Format)); 333_ => throw new InvalidDataException(SR.Format(SR.TarInvalidFormat, Format)),
System\Formats\Tar\TarWriter.Unix.cs (1)
49_ => throw new InvalidDataException(SR.Format(SR.TarInvalidFormat, Format)),
System.IO.Compression (53)
System\IO\Compression\DeflateManaged\DeflateManagedStream.cs (2)
134throw new InvalidDataException(SR.GenericInvalidData); 221throw new InvalidDataException(SR.GenericInvalidData);
System\IO\Compression\DeflateManaged\HuffmanTree.cs (4)
191throw new InvalidDataException(SR.InvalidHuffmanData); 233throw new InvalidDataException(SR.InvalidHuffmanData); 253throw new InvalidDataException(SR.InvalidHuffmanData); 304throw new InvalidDataException(SR.InvalidHuffmanData);
System\IO\Compression\DeflateManaged\InflaterManaged.cs (13)
212throw new InvalidDataException(SR.UnknownBlockType); 238throw new InvalidDataException(SR.UnknownBlockType); 297throw new InvalidDataException(SR.InvalidBlockLength); 330throw new InvalidDataException(SR.UnknownState); 393throw new InvalidDataException(SR.GenericInvalidData); 415throw new InvalidDataException(SR.GenericInvalidData); 473throw new InvalidDataException(SR.UnknownState); 607throw new InvalidDataException(); 615throw new InvalidDataException(); 635throw new InvalidDataException(); 656throw new InvalidDataException(); 671throw new InvalidDataException(SR.UnknownState); 684throw new InvalidDataException();
System\IO\Compression\DeflateZLib\DeflateStream.cs (4)
388throw new InvalidDataException(SR.GenericInvalidData); 391throw new InvalidDataException(SR.TruncatedData); 1014return Task.FromException(new InvalidDataException(SR.GenericInvalidData)); 1063throw new InvalidDataException(SR.GenericInvalidData);
System\IO\Compression\DeflateZLib\Inflater.cs (1)
308throw new InvalidDataException(SR.UnsupportedCompression);
System\IO\Compression\ZipArchive.Async.cs (5)
224throw new InvalidDataException(SR.Format(SR.CentralDirectoryInvalid, ex)); 248throw new InvalidDataException(SR.EOCDNotFound); 259throw new InvalidDataException(SR.FieldTooBigOffsetToCD); 264throw new InvalidDataException(SR.CDCorrupt, ex); 268throw new InvalidDataException(SR.CDCorrupt, ex);
System\IO\Compression\ZipArchive.cs (13)
516throw new InvalidDataException(SR.NumEntriesWrong); 540throw new InvalidDataException(SR.NumEntriesWrong); 586throw new InvalidDataException(SR.Format(SR.CentralDirectoryInvalid, ex)); 595throw new InvalidDataException(SR.SplitSpanned); 601throw new InvalidDataException(SR.SplitSpanned); 625throw new InvalidDataException(SR.EOCDNotFound); 636throw new InvalidDataException(SR.FieldTooBigOffsetToCD); 641throw new InvalidDataException(SR.CDCorrupt, ex); 645throw new InvalidDataException(SR.CDCorrupt, ex); 652throw new InvalidDataException(SR.FieldTooBigOffsetToZip64EOCD); 664throw new InvalidDataException(SR.FieldTooBigNumEntries); 667throw new InvalidDataException(SR.FieldTooBigOffsetToCD); 670throw new InvalidDataException(SR.SplitSpanned);
System\IO\Compression\ZipArchiveEntry.Async.cs (2)
49throw new InvalidDataException(SR.LocalFileHeaderCorrupt); 193throw new InvalidDataException(message);
System\IO\Compression\ZipArchiveEntry.cs (2)
401throw new InvalidDataException(SR.LocalFileHeaderCorrupt); 690throw new InvalidDataException(message);
System\IO\Compression\ZipBlocks.Async.cs (2)
92throw new InvalidDataException(SR.Zip64EOCDNotWhereExpected); 253throw new InvalidDataException(SR.EOCDNotFound);
System\IO\Compression\ZipBlocks.cs (5)
313throw new InvalidDataException(SR.FieldTooBigUncompressedSize); 317throw new InvalidDataException(SR.FieldTooBigCompressedSize); 321throw new InvalidDataException(SR.FieldTooBigLocalHeaderOffset); 522throw new InvalidDataException(SR.Zip64EOCDNotWhereExpected); 967throw new InvalidDataException(SR.EOCDNotFound);
System.IO.Compression.Brotli (4)
System\IO\Compression\dec\BrotliStream.Decompress.cs (2)
243throw new InvalidDataException(SR.BrotliStream_Decompress_InvalidStream); 246throw new InvalidDataException(SR.BrotliStream_Decompress_TruncatedData);
System\IO\Compression\enc\BrotliStream.Compress.cs (2)
199throw new InvalidDataException(SR.BrotliStream_Compress_InvalidData); 240throw new InvalidDataException(SR.BrotliStream_Compress_InvalidData);
System.Net.NetworkInformation (1)
src\libraries\Common\src\System\IO\StringParser.cs (1)
326throw new InvalidDataException();
System.Private.CoreLib (1)
src\libraries\Common\src\System\IO\StringParser.cs (1)
326throw new InvalidDataException();
System.ServiceModel.NetFramingBase (17)
System\ServiceModel\Channels\FramingDecoders.cs (17)
68throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataException(SR.FramingSizeTooLarge)); 172throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataException(SR.InvalidDecoderStateMachine)); 222Exception result = new InvalidDataException(SR.Format(SR.FramingViaTooLong, size)); 236throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidDataException(SR.Format(SR.FramingViaNotUri, value), exception)); 265return new InvalidDataException(SR.Format(SR.FramingFaultTooLong, size)); 337Exception result = new InvalidDataException(SR.Format(SR.FramingContentTypeTooLong, size)); 396Exception exception = CreateException(new InvalidDataException(SR.Format( 432return new InvalidDataException(SR.Format(SR.FramingRecordTypeMismatch, expectedType.ToString(), foundType.ToString())); 439Exception exception = CreateException(new InvalidDataException(SR.Format( 447return CreateException(new InvalidDataException(SR.FramingPrematureEOF)); 556CreateException(new InvalidDataException(SR.FramingAtEnd))); 560CreateException(new InvalidDataException(SR.InvalidDecoderStateMachine))); 782CreateException(new InvalidDataException(SR.FramingAtEnd))); 785CreateException(new InvalidDataException(SR.InvalidDecoderStateMachine))); 890CreateException(new InvalidDataException(SR.FramingAtEnd))); 908CreateException(new InvalidDataException(SR.FramingAtEnd))); 911CreateException(new InvalidDataException(SR.InvalidDecoderStateMachine)));
240 references to InvalidDataException
AnalyzerRunner (1)
Program.cs (1)
36catch (InvalidDataException)
dotnet-svcutil-lib (6)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BinaryMessageEncoder.cs (1)
546catch (InvalidDataException)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\FramingDecoders.cs (5)
447protected Exception CreateException(InvalidDataException innerException, string framingFault) 454protected Exception CreateException(InvalidDataException innerException) 567catch (InvalidDataException e) 793catch (InvalidDataException e) 916catch (InvalidDataException e)
Microsoft.AspNetCore.Antiforgery (1)
Internal\DefaultAntiforgeryTokenStore.cs (1)
60catch (InvalidDataException ex)
Microsoft.AspNetCore.Antiforgery.Test (1)
DefaultAntiforgeryTokenStoreTest.cs (1)
321var exception = new InvalidDataException();
Microsoft.AspNetCore.Components.Server.Tests (2)
src\SignalR\common\SignalR.Common\test\Internal\Protocol\MessagePackHubProtocolTestBase.cs (2)
364var exception = Assert.Throws<InvalidDataException>(() => HubProtocol.TryParseMessage(ref data, binder, out _));
Microsoft.AspNetCore.Http (8)
Features\FormOptions.cs (8)
55/// be buffered. Forms that exceed this limit will throw an <see cref="InvalidDataException"/> when parsed. 62/// Forms that exceed this limit will throw an <see cref="InvalidDataException"/> when parsed. 69/// throw an <see cref="InvalidDataException"/> when parsed. 76/// limit will throw an <see cref="InvalidDataException"/> when parsed. 83/// limit will throw an <see cref="InvalidDataException"/> when parsed. 90/// be combined. Form sections that exceed this limit will throw an <see cref="InvalidDataException"/> 98/// Form sections that exceed this limit will throw an <see cref="InvalidDataException"/> when parsed. 105/// <see cref="InvalidDataException"/> when parsed.
Microsoft.AspNetCore.Http.Connections.Tests (4)
NegotiateProtocolTests.cs (4)
62var exception = Assert.Throws<InvalidDataException>(() => NegotiateProtocol.ParseResponse(responseData)); 82var exception = Assert.Throws<InvalidDataException>(() => NegotiateProtocol.ParseResponse(responseData));
Microsoft.AspNetCore.Http.Extensions (1)
RequestDelegateFactory.cs (1)
1542catch (InvalidDataException ex)
Microsoft.AspNetCore.Http.Extensions.Tests (2)
RequestDelegateGenerator\RequestDelegateCreationTests.Forms.cs (2)
978Assert.IsType<InvalidDataException>(logMessage.Exception); 1018Assert.IsType<InvalidDataException>(badHttpRequestException.InnerException);
Microsoft.AspNetCore.Http.Tests (12)
Features\FormFeatureTests.cs (12)
41var exception = await Assert.ThrowsAsync<InvalidDataException>(() => context.Request.ReadFormAsync()); 468var exception = await Assert.ThrowsAsync<InvalidDataException>(() => context.Request.ReadFormAsync()); 492var exception = await Assert.ThrowsAsync<InvalidDataException>(() => context.Request.ReadFormAsync()); 516var exception = await Assert.ThrowsAsync<InvalidDataException>(() => context.Request.ReadFormAsync()); 540var exception = await Assert.ThrowsAsync<InvalidDataException>(() => context.Request.ReadFormAsync()); 608var exception = await Assert.ThrowsAsync<InvalidDataException>(() => context.Request.ReadFormAsync());
Microsoft.AspNetCore.InternalTesting (1)
HttpClientSlim.cs (1)
119catch (InvalidDataException)
Microsoft.AspNetCore.Mvc.Core (11)
ModelBinding\FormFileValueProviderFactory.cs (1)
39catch (InvalidDataException ex)
ModelBinding\FormValueProviderFactory.cs (1)
41catch (InvalidDataException ex)
ModelBinding\JQueryFormValueProviderFactory.cs (1)
41catch (InvalidDataException ex)
RequestFormLimitsAttribute.cs (8)
69/// be buffered. Forms that exceed this limit will throw an <see cref="InvalidDataException"/> when parsed. 81/// Forms that exceed this limit will throw an <see cref="InvalidDataException"/> when parsed. 93/// throw an <see cref="InvalidDataException"/> when parsed. 105/// limit will throw an <see cref="InvalidDataException"/> when parsed. 117/// limit will throw an <see cref="InvalidDataException"/> when parsed. 129/// be combined. Form sections that exceed this limit will throw an <see cref="InvalidDataException"/> 142/// Form sections that exceed this limit will throw an <see cref="InvalidDataException"/> when parsed. 154/// <see cref="InvalidDataException"/> when parsed.
Microsoft.AspNetCore.Mvc.Core.Test (3)
ModelBinding\FormFileValueProviderFactoryTest.cs (1)
64var exception = new InvalidDataException();
ModelBinding\FormValueProviderFactoryTest.cs (1)
52var exception = new InvalidDataException();
ModelBinding\JQueryFormValueProviderFactoryTest.cs (1)
137var exception = new InvalidDataException();
Microsoft.AspNetCore.RequestDecompression.Tests (1)
RequestDecompressionMiddlewareTests.cs (1)
123await Assert.ThrowsAsync<InvalidDataException>(async () => await InvokeMiddleware(compressedBytes, new[] { contentEncoding }));
Microsoft.AspNetCore.SignalR.Client.Core (1)
HubConnection.cs (1)
1571catch (InvalidDataException ex)
Microsoft.AspNetCore.SignalR.Client.Tests (4)
HttpConnectionTests.Negotiate.cs (2)
31return RunInvalidNegotiateResponseTest<InvalidDataException>(negotiatePayload, "Invalid negotiation response received."); 43return RunInvalidNegotiateResponseTest<InvalidDataException>(ResponseUtils.CreateNegotiationContent(negotiateVersion: 1, connectionToken: null), "Invalid negotiation response received.");
HubConnectionTests.Protocol.cs (2)
83var ex = await Assert.ThrowsAsync<InvalidDataException>(() => startTask).DefaultTimeout();
Microsoft.AspNetCore.SignalR.Common.Tests (14)
Internal\Protocol\HandshakeProtocolTests.cs (4)
91var exception = Assert.Throws<InvalidDataException>(() => 107var exception = Assert.Throws<InvalidDataException>(() =>
Internal\Protocol\JsonHubProtocolTests.cs (2)
54var ex = Assert.Throws<InvalidDataException>(() => JsonHubProtocol.TryParseMessage(ref data, binder, out var _));
Internal\Protocol\JsonHubProtocolTestsBase.cs (4)
196var ex = Assert.Throws<InvalidDataException>(() => JsonHubProtocol.TryParseMessage(ref data, binder, out var _)); 269var ex = Assert.Throws<InvalidDataException>(() => JsonHubProtocol.TryParseMessage(ref data, binder, out var message));
Internal\Protocol\MessagePackHubProtocolTestBase.cs (2)
364var exception = Assert.Throws<InvalidDataException>(() => HubProtocol.TryParseMessage(ref data, binder, out _));
Internal\Protocol\NewtonsoftJsonHubProtocolTests.cs (2)
52var ex = Assert.Throws<InvalidDataException>(() => JsonHubProtocol.TryParseMessage(ref data, binder, out var _));
Microsoft.AspNetCore.SignalR.Tests (3)
HubConnectionHandlerTests.cs (3)
500(w.Exception is InvalidDataException ide)); 530(w.Exception is InvalidDataException ide)); 581(w.Exception is InvalidDataException ide));
Microsoft.AspNetCore.WebUtilities.Tests (40)
FormPipeReaderTests.cs (26)
82var exception = await Assert.ThrowsAsync<InvalidDataException>( 108var exception = await Assert.ThrowsAsync<InvalidDataException>( 123var exception = await Assert.ThrowsAsync<InvalidDataException>( 151var exception = await Assert.ThrowsAsync<InvalidDataException>( 179var exception = await Assert.ThrowsAsync<InvalidDataException>( 199var readTask = Assert.ThrowsAsync<InvalidDataException>( 205var exception = await readTask; 226var exception = Assert.Throws<InvalidDataException>( 455var exception = Assert.Throws<InvalidDataException>(() => formReader.ParseFormValues(ref readOnlySequence, ref accumulator, isFinalBlock: true)); 469var exception = Assert.Throws<InvalidDataException>(() => formReader.ParseFormValues(ref readOnlySequence, ref accumulator, isFinalBlock: true)); 483var exception = Assert.Throws<InvalidDataException>(() => formReader.ParseFormValues(ref readOnlySequence, ref accumulator, isFinalBlock: true)); 497var exception = Assert.Throws<InvalidDataException>(() => formReader.ParseFormValues(ref readOnlySequence, ref accumulator, isFinalBlock: true)); 511var exception = Assert.Throws<InvalidDataException>(() => formReader.ParseFormValues(ref readOnlySequence, ref accumulator, isFinalBlock: true)); 525var exception = Assert.Throws<InvalidDataException>(() => formReader.ParseFormValues(ref readOnlySequence, ref accumulator, isFinalBlock: true));
FormReaderTests.cs (8)
83var exception = await Assert.ThrowsAsync<InvalidDataException>( 95var exception = await Assert.ThrowsAsync<InvalidDataException>( 122var exception = await Assert.ThrowsAsync<InvalidDataException>( 149var exception = await Assert.ThrowsAsync<InvalidDataException>(
MultipartReaderTests.cs (6)
132var exception = await Assert.ThrowsAsync<InvalidDataException>(() => reader.ReadNextSectionAsync()); 145var exception = await Assert.ThrowsAsync<InvalidDataException>(() => reader.ReadNextSectionAsync()); 160var exception = await Assert.ThrowsAsync<InvalidDataException>(() => reader.ReadNextSectionAsync());
Microsoft.Build (2)
BackEnd\Components\Scheduler\SchedulingPlan.cs (1)
176catch (InvalidDataException)
Logging\BinaryLogger\BuildEventArgsReader.cs (1)
239e is InvalidDataException ||
Microsoft.CodeAnalysis (19)
CommandLine\CommonCompiler.cs (1)
513else if (e is InvalidDataException)
DiagnosticAnalyzer\AdditionalTextComparer.cs (1)
65catch (InvalidDataException)
Emit\EditAndContinue\DefinitionMap.cs (2)
294catch (Exception e) when (e is InvalidDataException or IOException or BadImageFormatException) 695catch (Exception e) when (e is InvalidDataException or IOException or BadImageFormatException)
Emit\EditAndContinue\EmitBaseline.cs (4)
104/// The function shall throw <see cref="InvalidDataException"/> if the debug information can't be read for the specified method. 109/// The function shall throw <see cref="InvalidDataException"/> if the information can't be read for the specified method. 264/// The function shall throw <see cref="InvalidDataException"/> if the debug information can't be read for the specified method. 273/// The function shall throw <see cref="InvalidDataException"/> if the information can't be read for the specified method.
Emit\EditAndContinueMethodDebugInformation.cs (5)
48/// <exception cref="InvalidDataException">Invalid data.</exception> 58/// <exception cref="InvalidDataException">Invalid data.</exception> 70private static InvalidDataException CreateInvalidDataException(ImmutableArray<byte> data, int offset) 91/// <exception cref="InvalidDataException">Invalid data.</exception> 308/// <exception cref="InvalidDataException">Invalid data.</exception>
EncodedStringText.cs (2)
67/// <exception cref="InvalidDataException"> 122/// <param name="throwIfBinaryDetected">Throw <see cref="InvalidDataException"/> if binary (non-text) data is detected.</param>
Text\SourceText.cs (4)
169/// characters, then an <see cref="InvalidDataException"/> is thrown.</param> 177/// <exception cref="InvalidDataException">Two consecutive NUL characters were detected in the decoded text and <paramref name="throwIfBinaryDetected"/> was true.</exception> 241/// characters, then an <see cref="InvalidDataException"/> is thrown.</param> 248/// <exception cref="InvalidDataException">Two consecutive NUL characters were detected in the decoded text and <paramref name="throwIfBinaryDetected"/> was true.</exception>
Microsoft.CodeAnalysis.CodeStyle (2)
src\Compilers\Core\Portable\EncodedStringText.cs (2)
67/// <exception cref="InvalidDataException"> 122/// <param name="throwIfBinaryDetected">Throw <see cref="InvalidDataException"/> if binary (non-text) data is detected.</param>
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Emit\EditAndContinue\EditAndContinueTests.cs (1)
12919[InlineData(typeof(InvalidDataException))]
Microsoft.CodeAnalysis.EditorFeatures (1)
Interactive\InteractivePasteCommandHandler.cs (1)
105catch (InvalidDataException)
Microsoft.CodeAnalysis.Features (1)
PdbSourceDocument\SourceLinkMap.cs (1)
61/// <exception cref="InvalidDataException">The JSON does not follow Source Link specification.</exception>
Microsoft.CodeAnalysis.UnitTests (8)
Emit\CustomDebugInfoTests.cs (6)
154var e = Assert.Throws<InvalidDataException>(() => EditAndContinueMethodDebugInformation.Create(ImmutableArray.Create(new byte[] { 0x01, 0x68, 0xff }), ImmutableArray<byte>.Empty)); 157e = Assert.Throws<InvalidDataException>(() => EditAndContinueMethodDebugInformation.Create(ImmutableArray.Create(new byte[] { 0x01, 0x68, 0xff, 0xff, 0xff, 0xff }), ImmutableArray<byte>.Empty)); 160e = Assert.Throws<InvalidDataException>(() => EditAndContinueMethodDebugInformation.Create(ImmutableArray.Create(new byte[] { 0xff, 0xff, 0xff, 0xff }), ImmutableArray<byte>.Empty)); 171e = Assert.Throws<InvalidDataException>(() => EditAndContinueMethodDebugInformation.Create(ImmutableArray.Create(largeData), ImmutableArray<byte>.Empty)); 337Assert.Throws<InvalidDataException>(() => EditAndContinueMethodDebugInformation.Create(
Text\SourceTextTests.cs (2)
343Assert.Throws<InvalidDataException>(() => SourceText.From(bytes, bytes.Length, throwIfBinaryDetected: true)); 346Assert.Throws<InvalidDataException>(() => SourceText.From(stream, throwIfBinaryDetected: true));
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
Emit\EditAndContinue\EditAndContinueTests.vb (1)
26<InlineData(GetType(InvalidDataException))>
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (1)
Parser\ParserRegressionTests.vb (1)
764Assert.Throws(Of System.IO.InvalidDataException)(Sub() VisualBasicSyntaxTree.ParseText(EncodedStringText.Create(data)))
Microsoft.CodeAnalysis.Workspaces (11)
Shared\Utilities\IOUtilities.cs (1)
59InvalidDataException;
src\Compilers\Core\Portable\EncodedStringText.cs (2)
67/// <exception cref="InvalidDataException"> 122/// <param name="throwIfBinaryDetected">Throw <see cref="InvalidDataException"/> if binary (non-text) data is detected.</param>
Workspace\Host\TextFactory\ITextFactoryService.cs (1)
28/// <exception cref="InvalidDataException">
Workspace\Solution\FileTextLoader.cs (2)
100/// <exception cref="InvalidDataException"></exception> 194/// <exception cref="InvalidDataException"></exception>
Workspace\Solution\TextLoader.cs (5)
58/// <exception cref="InvalidDataException"/> 80/// <exception cref="InvalidDataException"/> 90/// <exception cref="InvalidDataException"/> 117catch (InvalidDataException e) 146catch (InvalidDataException e)
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\MSBuildWorkspace.cs (1)
444catch (InvalidDataException)
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
SolutionTests\SolutionTests.cs (2)
4535catch (InvalidDataException ex) 4549catch (InvalidDataException ex)
Microsoft.DotNet.Build.Tasks.Packaging.Tests (4)
NugetPropertyStringProviderTests.cs (4)
62act.Should().Throw<InvalidDataException>(); 69act.Should().Throw<InvalidDataException>(); 76act.Should().Throw<InvalidDataException>(); 83act.Should().Throw<InvalidDataException>();
Microsoft.DotNet.Build.Tasks.VisualStudio.Tests (1)
OptProf\GetRunSettingsSessionConfigurationTests.cs (1)
409Assert.Throws<InvalidDataException>(() => GetRunSettingsSessionConfiguration.GetTestsDropName(jsonString));
Microsoft.DotNet.SignCheckLibrary (1)
Verification\MachOVerifier.cs (1)
47catch (Exception ex) when (ex is PlatformNotSupportedException || ex is InvalidDataException)
Microsoft.Extensions.Configuration.FileExtensions (2)
FileConfigurationProvider.cs (2)
107var exception = new InvalidDataException(SR.Format(SR.Error_FailedToLoad, file.PhysicalPath), ex); 122/// <exception cref="InvalidDataException">An exception was thrown by the concrete implementation of the
Microsoft.ML.TorchSharp (1)
Utils\FileUtils.cs (1)
41/// <exception cref="InvalidDataException">When the contents in the stream don't match the need.</exception>
Microsoft.VisualStudio.LanguageServices (1)
Packaging\PackageInstallerServiceFactory.cs (1)
172catch (Exception ex) when (ex is InvalidDataException or InvalidOperationException)
netstandard (1)
netstandard.cs (1)
930[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.InvalidDataException))]
PresentationUI (4)
MS\Internal\Documents\Application\DocumentStream.cs (4)
88/// <exception cref="System.IO.InvalidDataException"/> 327/// <exception cref="System.IO.InvalidDataException"/> 342/// <exception cref="System.IO.InvalidDataException"/> 717/// <exception cref="System.IO.InvalidDataException"/>
System (1)
src\libraries\shims\System\ref\System.cs (1)
567[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.InvalidDataException))]
System.Formats.Tar (2)
System\Formats\Tar\TarReader.cs (2)
107/// <exception cref="InvalidDataException"><para>The entry's data is malformed.</para> 167/// <exception cref="InvalidDataException"><para>The archive is malformed.</para>
System.IO (1)
System.IO.cs (1)
12[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.InvalidDataException))]
System.IO.Compression (11)
System\IO\Compression\ZipArchive.Async.cs (1)
63/// <exception cref="InvalidDataException">The contents of the stream could not be interpreted as a Zip file. -or- mode is Update and an entry is missing from the archive or is corrupt and cannot be read. -or- mode is Update and an entry is too large to fit into memory.</exception>
System\IO\Compression\ZipArchive.cs (6)
44/// <exception cref="InvalidDataException">The contents of the stream could not be interpreted as a Zip archive.</exception> 54/// <exception cref="InvalidDataException">The contents of the stream could not be interpreted as a Zip file. -or- mode is Update and an entry is missing from the archive or is corrupt and cannot be read. -or- mode is Update and an entry is too large to fit into memory.</exception> 65/// <exception cref="InvalidDataException">The contents of the stream could not be interpreted as a Zip file. -or- mode is Update and an entry is missing from the archive or is corrupt and cannot be read. -or- mode is Update and an entry is too large to fit into memory.</exception> 77/// <exception cref="InvalidDataException">The contents of the stream could not be interpreted as a Zip file. -or- mode is Update and an entry is missing from the archive or is corrupt and cannot be read. -or- mode is Update and an entry is too large to fit into memory.</exception> 224/// <exception cref="InvalidDataException">The Zip archive is corrupt and the entries cannot be retrieved.</exception> 327/// <exception cref="InvalidDataException">The Zip archive is corrupt and the entries cannot be retrieved.</exception>
System\IO\Compression\ZipArchiveEntry.Async.cs (2)
20/// <exception cref="InvalidDataException">The entry is missing from the archive or is corrupt and cannot be read. -or- The entry has been compressed using a compression method that is not supported.</exception> 75catch (InvalidDataException)
System\IO\Compression\ZipArchiveEntry.cs (2)
346/// <exception cref="InvalidDataException">The entry is missing from the archive or is corrupt and cannot be read. -or- The entry has been compressed using a compression method that is not supported.</exception> 425catch (InvalidDataException)
System.IO.Compression.Brotli (2)
System\IO\Compression\dec\BrotliStream.Decompress.cs (1)
29/// <exception cref="System.IO.InvalidDataException">The data is in an invalid format.</exception>
System\IO\Compression\enc\BrotliStream.Compress.cs (1)
182/// <exception cref="InvalidDataException">The encoder ran into invalid data.</exception>
System.IO.Compression.ZipFile (30)
System\IO\Compression\ZipFile.Create.Async.cs (3)
29/// <exception cref="InvalidDataException">The specified file could not be interpreted as a Zip file.</exception> 54/// <exception cref="InvalidDataException">The specified file could not be interpreted as a Zip file. 93/// <exception cref="InvalidDataException">The specified file could not be interpreted as a Zip file.
System\IO\Compression\ZipFile.Create.cs (3)
27/// <exception cref="InvalidDataException">The specified file could not be interpreted as a Zip file.</exception> 50/// <exception cref="InvalidDataException">The specified file could not be interpreted as a Zip file. 87/// <exception cref="InvalidDataException">The specified file could not be interpreted as a Zip file.
System\IO\Compression\ZipFile.Extract.Async.cs (8)
35/// <exception cref="InvalidDataException">The archive specified by sourceArchive: Is not a valid ZipArchive 69/// <exception cref="InvalidDataException">The archive specified by sourceArchive: Is not a valid ZipArchive 104/// <exception cref="InvalidDataException">The archive specified by sourceArchive: Is not a valid ZipArchive 160/// <exception cref="InvalidDataException">The archive specified by sourceArchive: Is not a valid ZipArchive 225/// <exception cref="InvalidDataException">The archive contained in the <paramref name="source" /> stream is not a valid zip archive. 256/// <exception cref="InvalidDataException">The archive contained in the <paramref name="source" /> stream is not a valid zip archive. 295/// <exception cref="InvalidDataException">The archive contained in the <paramref name="source" /> stream is not a valid zip archive. 335/// <exception cref="InvalidDataException">The archive contained in the <paramref name="source" /> stream is not a valid zip archive.
System\IO\Compression\ZipFile.Extract.cs (8)
33/// <exception cref="InvalidDataException">The archive specified by sourceArchive: Is not a valid ZipArchive 65/// <exception cref="InvalidDataException">The archive specified by sourceArchive: Is not a valid ZipArchive 98/// <exception cref="InvalidDataException">The archive specified by sourceArchive: Is not a valid ZipArchive 152/// <exception cref="InvalidDataException">The archive specified by sourceArchive: Is not a valid ZipArchive 211/// <exception cref="InvalidDataException">The archive contained in the <paramref name="source" /> stream is not a valid zip archive. 240/// <exception cref="InvalidDataException">The archive contained in the <paramref name="source" /> stream is not a valid zip archive. 277/// <exception cref="InvalidDataException">The archive contained in the <paramref name="source" /> stream is not a valid zip archive. 315/// <exception cref="InvalidDataException">The archive contained in the <paramref name="source" /> stream is not a valid zip archive.
System\IO\Compression\ZipFileExtensions.ZipArchive.Extract.Async.cs (2)
31/// <exception cref="InvalidDataException">An archive entry was not found or was corrupt. 63/// <exception cref="InvalidDataException">An archive entry was not found or was corrupt.
System\IO\Compression\ZipFileExtensions.ZipArchive.Extract.cs (2)
29/// <exception cref="InvalidDataException">An archive entry was not found or was corrupt. 59/// <exception cref="InvalidDataException">An archive entry was not found or was corrupt.
System\IO\Compression\ZipFileExtensions.ZipArchiveEntry.Extract.Async.cs (2)
29/// <exception cref="InvalidDataException">The entry is missing from the archive or is corrupt and cannot be read 58/// <exception cref="InvalidDataException">The entry is missing from the archive or is corrupt and cannot be read
System\IO\Compression\ZipFileExtensions.ZipArchiveEntry.Extract.cs (2)
26/// <exception cref="InvalidDataException">The entry is missing from the archive or is corrupt and cannot be read 55/// <exception cref="InvalidDataException">The entry is missing from the archive or is corrupt and cannot be read
System.IO.Packaging (1)
System\IO\Packaging\ZipPackage.cs (1)
404catch (InvalidDataException)
System.Private.CoreLib (4)
src\libraries\System.Private.CoreLib\src\System\IO\InvalidDataException.cs (4)
10/// <remarks>An <see cref="InvalidDataException" /> is thrown when invalid data is detected in the data stream.</remarks> 15/// <summary>Initializes a new instance of the <see cref="InvalidDataException" /> class.</summary> 22/// <summary>Initializes a new instance of the <see cref="InvalidDataException" /> class with a specified error message.</summary> 30/// <summary>Initializes a new instance of the <see cref="InvalidDataException" /> class with a reference to the inner exception that is the cause of this exception.</summary>
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
313[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.InvalidDataException))]
System.Runtime.Extensions (1)
System.Runtime.Extensions.cs (1)
42[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IO.InvalidDataException))]
System.ServiceModel.NetFramingBase (5)
System\ServiceModel\Channels\FramingDecoders.cs (5)
450protected Exception CreateException(InvalidDataException innerException, string framingFault) 457protected Exception CreateException(InvalidDataException innerException) 566catch (InvalidDataException e) 791catch (InvalidDataException e) 917catch (InvalidDataException e)