522 references to FormatException
Aspire.Dashboard (2)
ResourceService\DashboardClient.cs (2)
376throw new FormatException($"Unexpected {nameof(WatchResourcesChange)} kind: {change.KindCase}"); 382throw new FormatException($"Unexpected {nameof(WatchResourcesUpdate)} kind: {response.KindCase}");
Aspire.Hosting (1)
Dashboard\DashboardService.cs (1)
94throw new FormatException($"Unexpected {nameof(ResourceSnapshotChange)} type: {update.ChangeType}");
dotnet-svcutil-lib (48)
FrameworkFork\Microsoft.Xml\Xml\schema\DatatypeImplementation.cs (1)
2088exception = new FormatException(string.Format(ResXml.XmlConvert_BadFormat, s, _dateTimeFlags.ToString()));
FrameworkFork\Microsoft.Xml\Xml\schema\XmlValueConverter.cs (2)
702throw new FormatException(e.Message); 719throw new FormatException(e.Message);
FrameworkFork\Microsoft.Xml\Xml\schema\XsdDateTime.cs (1)
126throw new FormatException(string.Format(ResXml.XmlConvert_BadFormat, text, kinds));
FrameworkFork\Microsoft.Xml\Xml\schema\XsdDuration.cs (1)
676return new FormatException(string.Format(ResXml.XmlConvert_BadFormat, s, durationType));
FrameworkFork\Microsoft.Xml\Xml\XmlConvert.cs (23)
902throw new FormatException(string.Format(ResXml.XmlConvert_BadFormat, s, "Boolean")); 919return new FormatException(string.Format(ResXml.XmlConvert_BadFormat, s, "Boolean")); 934throw new FormatException(ResXml.XmlConvert_NotOneCharString); 943return new FormatException(string.Format(ResXml.XmlConvert_BadFormat, s, "Char")); 961return new FormatException(string.Format(ResXml.XmlConvert_BadFormat, s, "Decimal")); 975return new FormatException(string.Format(ResXml.XmlConvert_BadFormat, s, "Integer")); 993return new FormatException(string.Format(ResXml.XmlConvert_BadFormat, s, "SByte")); 1011return new FormatException(string.Format(ResXml.XmlConvert_BadFormat, s, "Int16")); 1029return new FormatException(string.Format(ResXml.XmlConvert_BadFormat, s, "Int32")); 1047return new FormatException(string.Format(ResXml.XmlConvert_BadFormat, s, "Int64")); 1065return new FormatException(string.Format(ResXml.XmlConvert_BadFormat, s, "Byte")); 1084return new FormatException(string.Format(ResXml.XmlConvert_BadFormat, s, "UInt16")); 1104return new FormatException(string.Format(ResXml.XmlConvert_BadFormat, s, "UInt32")); 1123return new FormatException(string.Format(ResXml.XmlConvert_BadFormat, s, "UInt64")); 1160return new FormatException(string.Format(ResXml.XmlConvert_BadFormat, s, "Single")); 1201return new FormatException(string.Format(ResXml.XmlConvert_BadFormat, s, "Double")); 1291throw new FormatException(string.Format(ResXml.XmlConvert_BadFormat, s, "TimeSpan")); 1476exception = new FormatException(string.Format(ResXml.XmlConvert_BadFormat, s, "Guid")); 1480exception = new FormatException(string.Format(ResXml.XmlConvert_BadFormat, s, "Guid")); 1524throw new FormatException(string.Format(ResXml.XmlConvert_BadFormat, s, "Uri")); 1530throw new FormatException(string.Format(ResXml.XmlConvert_BadFormat, s, "Uri")); 1544return new FormatException(string.Format(ResXml.XmlConvert_BadFormat, s, "Uri")); 1549return new FormatException(string.Format(ResXml.XmlConvert_BadFormat, s, "Uri"));
FrameworkFork\System.Runtime.Serialization\System\Text\Base64Encoding.cs (10)
42throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new FormatException(string.Format(SRSerialization.XmlInvalidBase64Length, charCount.ToString(NumberFormatInfo.CurrentInfo)))); 79throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new FormatException(string.Format(SRSerialization.XmlInvalidBase64Length, count.ToString(NumberFormatInfo.CurrentInfo)))); 96throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new FormatException(string.Format(SRSerialization.XmlInvalidBase64Sequence, new string(pch, 0, 4), index + (int)(pch - _chars)))); 106throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new FormatException(string.Format(SRSerialization.XmlInvalidBase64Sequence, new string(pch, 0, 4), index + (int)(pch - _chars)))); 147throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new FormatException(string.Format(SRSerialization.XmlInvalidBase64Length, charCount.ToString(NumberFormatInfo.CurrentInfo)))); 167throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new FormatException(string.Format(SRSerialization.XmlInvalidBase64Sequence, new string(pch, 0, 4), charIndex + (int)(pch - _chars)))); 177throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new FormatException(string.Format(SRSerialization.XmlInvalidBase64Sequence, new string(pch, 0, 4), charIndex + (int)(pch - _chars)))); 230throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new FormatException(string.Format(SRSerialization.XmlInvalidBase64Length, charCount.ToString(NumberFormatInfo.CurrentInfo)))); 249throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new FormatException(string.Format(SRSerialization.XmlInvalidBase64Sequence, "?", charIndex + (int)(pch - _chars)))); 259throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new FormatException(string.Format(SRSerialization.XmlInvalidBase64Sequence, "?", charIndex + (int)(pch - _chars))));
FrameworkFork\System.Runtime.Serialization\System\Text\BinHexEncoding.cs (3)
40throw new FormatException(string.Format(SRSerialization.XmlInvalidBinHexLength, charCount.ToString(NumberFormatInfo.CurrentInfo))); 87throw new FormatException(string.Format(SRSerialization.XmlInvalidBinHexSequence, new string(pch, 0, 2), charIndex + (int)(pch - _chars))); 91throw new FormatException(string.Format(SRSerialization.XmlInvalidBinHexSequence, new string(pch, 0, 2), charIndex + (int)(pch - _chars)));
FrameworkFork\System.Runtime.Serialization\System\Xml\UniqueId.cs (2)
111throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new FormatException(string.Format(SRSerialization.XmlInvalidUniqueId))); 137throw /*System.Runtime.Serialization.*/DiagnosticUtility.ExceptionUtility.ThrowHelperError(new FormatException(string.Format(SRSerialization.XmlInvalidUniqueId)));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageFault.cs (2)
176throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new FormatException(SRServiceModel.ExtraContentIsPresentInFaultDetail)); 643throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new FormatException(SRServiceModel.AtLeastOneFaultReasonMustBeSpecified));
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\FaultFormatter.cs (1)
143throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new FormatException(SRServiceModel.ExtraContentIsPresentInFaultDetail));
Shared\FrameworkInfo.cs (1)
103throw new FormatException(fullFrameworkName);
Shared\ProjectDependency.cs (1)
273throw new FormatException(string.Format(CultureInfo.CurrentCulture, Shared.Resources.ErrorDepenencySpecFormat, dependencySpec));
Microsoft.AspNetCore.Authentication.Cookies (1)
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (1)
113throw new FormatException(
Microsoft.AspNetCore.Components.Endpoints.Tests (2)
Binding\FormDataMapperTests.cs (2)
2250throw new FormatException("Invalid point format."); 2298throw new FormatException("Invalid point format.");
Microsoft.AspNetCore.Components.Server (3)
BlazorPack\BlazorPackHubProtocolWorker.cs (2)
68throw new FormatException($"Type {type} is not supported"); 108throw new FormatException($"Unsupported argument type {type}");
src\SignalR\common\Shared\BinaryMessageParser.cs (1)
57throw new FormatException("Messages over 2GB in size are not supported.");
Microsoft.AspNetCore.CookiePolicy.Test (1)
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (1)
113throw new FormatException(
Microsoft.AspNetCore.DataProtection.Abstractions (1)
src\Shared\WebEncoders\WebEncoders.cs (1)
458throw new FormatException(
Microsoft.AspNetCore.Diagnostics.Tests (1)
DeveloperExceptionPageMiddlewareTest.cs (1)
677return next(new ErrorContext(context.HttpContext, new FormatException("Bad format exception!")));
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
Internal\GrpcProtocolHelpers.cs (1)
27throw new FormatException("Invalid base64 header value");
Microsoft.AspNetCore.Http (4)
BindingAddress.cs (4)
160throw new FormatException($"Invalid url: '{address}'"); 178throw new FormatException($"Invalid url: '{address}'"); 243throw new FormatException($"Invalid url: '{address}'"); 248throw new FormatException($"Invalid url, unix socket path must be absolute: '{address}'");
Microsoft.AspNetCore.Http.Abstractions (1)
HostString.cs (1)
240throw new FormatException($"The given host value '{value}' has a malformed port.");
Microsoft.AspNetCore.Http.Connections (1)
src\Shared\WebEncoders\WebEncoders.cs (1)
458throw new FormatException(
Microsoft.AspNetCore.Http.Connections.Client (1)
HttpConnection.cs (1)
512throw new FormatException("Invalid connection id.");
Microsoft.AspNetCore.Http.Extensions (1)
UriHelper.cs (1)
121throw new FormatException("No scheme delimiter in uri.");
Microsoft.AspNetCore.HttpOverrides (1)
IPNetwork.cs (1)
126throw new FormatException("An invalid IP address or prefix length was specified.");
Microsoft.AspNetCore.Mvc.Abstractions.Test (2)
ModelBinding\ModelStateDictionaryTest.cs (2)
963var exception = new FormatException("The supplied value is invalid for Length."); 1076var exception = new FormatException("The value 'some value' is not valid for Length.");
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
DefaultApiDescriptionProviderTest.cs (1)
2698throw new FormatException($"{nameof(s)} is not in the correct format");
Microsoft.AspNetCore.Mvc.Core (1)
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (1)
113throw new FormatException(
Microsoft.AspNetCore.Mvc.Core.Test (1)
ModelBinding\Binders\BodyModelBinderTests.cs (1)
259var expectedFormatException = new FormatException("bad format!");
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (1)
DefaultEditorTemplatesTest.cs (1)
1301throw new FormatException(expectedMessage);
Microsoft.AspNetCore.Rewrite (51)
ApacheModRewrite\ConditionPatternParser.cs (15)
38throw new FormatException(Resources.FormatError_InputParserUnrecognizedParameter(condition, context.Index)); 48throw new FormatException(Resources.FormatError_InputParserUnrecognizedParameter(condition, context.Index)); 60throw new FormatException(Resources.FormatError_InputParserUnrecognizedParameter(condition, context.Index)); 67throw new FormatException(Resources.FormatError_InputParserUnrecognizedParameter(condition, context.Index)); 82throw new FormatException(Resources.FormatError_InputParserUnrecognizedParameter(condition, context.Index)); 89throw new FormatException(Resources.FormatError_InputParserUnrecognizedParameter(condition, context.Index)); 104throw new FormatException(Resources.FormatError_InputParserUnrecognizedParameter(condition, context.Index)); 130throw new FormatException(Resources.FormatError_InputParserUnrecognizedParameter(condition, context.Index)); 145throw new FormatException(Resources.FormatError_InputParserUnrecognizedParameter(context.Template, context.Index)); 169throw new FormatException(Resources.FormatError_InputParserUnrecognizedParameter(context.Template, context.Index)); 175throw new FormatException(Resources.FormatError_InputParserUnrecognizedParameter(context.Template, context.Index)); 184throw new FormatException(Resources.FormatError_InputParserUnrecognizedParameter(context.Template, context.Index)); 200throw new FormatException(Resources.FormatError_InputParserUnrecognizedParameter(context.Template, context.Index)); 205throw new FormatException(Resources.FormatError_InputParserUnrecognizedParameter(context.Template, context.Index)); 209throw new FormatException(Resources.FormatError_InputParserUnrecognizedParameter(context.Template, context.Index));
ApacheModRewrite\CookieActionFactory.cs (2)
51throw new FormatException(Resources.FormatError_InvalidChangeCookieFlag(flagValue)); 85throw new FormatException(Resources.FormatError_CouldNotParseInteger(value));
ApacheModRewrite\FileParser.cs (2)
30throw new FormatException(Resources.FormatError_ModRewriteParseError("Too many tokens on line", lineNum)); 91throw new FormatException(Resources.FormatError_ModRewriteParseError("Unrecognized keyword: " + tokens[0], lineNum));
ApacheModRewrite\FlagParser.cs (2)
63throw new FormatException("Flags should start and end with square brackets: [flags]"); 79throw new FormatException($"Unrecognized flag: '{tokenSpan[hasPayload[0]]}'");
ApacheModRewrite\RuleBuilder.cs (1)
212throw new FormatException(Resources.FormatError_InputParserInvalidInteger(statusCode, -1));
ApacheModRewrite\RuleRegexParser.cs (1)
12throw new FormatException("Regex expression is null");
ApacheModRewrite\ServerVariables.cs (1)
118throw new FormatException(Resources.FormatError_InputParserUnrecognizedParameter(serverVariable, context.Index));
ApacheModRewrite\TestStringParser.cs (6)
48throw new FormatException(Resources.FormatError_InputParserUnrecognizedParameter(testString, context.Index)); 57throw new FormatException(Resources.FormatError_InputParserNoBackreference(context.Index)); 71throw new FormatException(Resources.FormatError_InputParserInvalidInteger(testString, context.Index)); 100throw new FormatException(Resources.FormatError_InputParserMissingCloseBrace(context.Index)); 107throw new FormatException(Resources.FormatError_InputParserMissingCloseBrace(context.Index)); 138throw new FormatException(Resources.FormatError_InputParserInvalidInteger(context.Template, context.Index));
ApacheModRewrite\Tokenizer.cs (3)
45throw new FormatException($"Invalid escaper character in string: {rule}"); 52throw new FormatException($"Mismatched number of quotes: {rule}"); 59throw new FormatException($"Mismatched number of quotes: {rule}");
IISUrlRewrite\InputParser.cs (10)
67throw new FormatException(Resources.FormatError_InputParserMissingCloseBrace(context.Index)); 121throw new FormatException(Resources.FormatError_InputParserMissingCloseBrace(context.Index)); 132throw new FormatException(Resources.FormatError_InputParserMissingCloseBrace(context.Index)); 143throw new FormatException(Resources.FormatError_InputParserMissingCloseBrace(context.Index)); 167throw new FormatException(Resources.FormatError_InputParserUnrecognizedParameter(parameter, context.Index)); 171throw new FormatException(Resources.FormatError_InputParserMissingCloseBrace(context.Index)); 178throw new FormatException(Resources.FormatError_InputParserNoBackreference(context.Index)); 186throw new FormatException(Resources.FormatError_InputParserMissingCloseBrace(context.Index)); 194throw new FormatException(Resources.FormatError_InputParserInvalidInteger(res, context.Index)); 199throw new FormatException(Resources.FormatError_InputParserIndexOutOfRange(res, context.Index));
IISUrlRewrite\InvalidUrlRewriteFormatException.cs (1)
15: base(FormatMessage(element, message))
IISUrlRewrite\ServerVariables.cs (1)
94throw new FormatException(Resources.FormatError_InputParserUnrecognizedParameter(serverVariable, context.Index));
IISUrlRewrite\UrlRewriteFileParser.cs (4)
152throw new FormatException("Match does not have an associated pattern attribute in condition"); 168throw new FormatException("Unrecognized matchType"); 177throw new FormatException("Match does not have an associated pattern attribute in condition"); 182throw new FormatException("Unrecognized pattern syntax");
PatternSegments\DateTimeSegment.cs (1)
41throw new FormatException($"Unsupported segment: '{segment}'");
UrlMatches\IntegerMatch.cs (1)
24throw new FormatException(Resources.Error_IntegerMatch_FormatExceptionMessage);
Microsoft.AspNetCore.Server.HttpSys (2)
UrlPrefix.cs (2)
111throw new FormatException("Invalid prefix, missing scheme separator: " + prefix); 140throw new FormatException("Invalid prefix, invalid port specified: " + prefix);
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\WebEncoders\WebEncoders.cs (1)
458throw new FormatException(
Microsoft.AspNetCore.SignalR.Common.Tests (1)
src\SignalR\common\Shared\BinaryMessageParser.cs (1)
57throw new FormatException("Messages over 2GB in size are not supported.");
Microsoft.AspNetCore.SignalR.Microbenchmarks (1)
src\SignalR\common\Shared\BinaryMessageParser.cs (1)
57throw new FormatException("Messages over 2GB in size are not supported.");
Microsoft.AspNetCore.SignalR.Protocols.MessagePack (1)
src\SignalR\common\Shared\BinaryMessageParser.cs (1)
57throw new FormatException("Messages over 2GB in size are not supported.");
Microsoft.AspNetCore.WebSockets.ConformanceTests (1)
Autobahn\AutobahnServerResult.cs (1)
24throw new FormatException("Results incorrectly formatted");
Microsoft.AspNetCore.WebUtilities (1)
src\Shared\WebEncoders\WebEncoders.cs (1)
458throw new FormatException(
Microsoft.Build (1)
Utilities\SimpleVersion.cs (1)
188return new FormatException(ResourceUtilities.GetResourceString(nameof(InvalidVersionFormat)));
Microsoft.CodeAnalysis.Features (3)
SymbolSearch\Windows\SymbolSearchUpdateEngine.Update.cs (3)
559throw new FormatException($"Patch format invalid. {nameof(upToDate)}={upToDate} {nameof(tooOld)}={tooOld} {nameof(hasPatchBytes)}={hasPatchBytes}"); 692_service._reportAndSwallowExceptionUnlessCanceled(new FormatException($"Database element invalid. Missing '{ContentAttributeName}' attribute"), CancellationToken.None); 711_service._reportAndSwallowExceptionUnlessCanceled(new FormatException($"Checksum mismatch: expected != actual. {expectedChecksum} != {actualChecksum}"), CancellationToken.None);
Microsoft.Data.Analysis (2)
DataFrame.IO.cs (2)
63IEnumerable<string> lines = read.Select(line => col < line.Line.Length ? line.Line[col] : throw new FormatException(string.Format(Strings.LessColumnsThatExpected, line.LineNumber + 1))); 438throw new FormatException(Strings.EmptyFile);
Microsoft.DotNet.Build.Tasks.Workloads (2)
WorkloadManifestPackage.wix.cs (1)
149throw new FormatException(string.Format(Strings.CannotExtractManifestIdFromPackageId, packageId));
WorkloadPackageBase.cs (1)
307throw new FormatException(string.Format(Strings.CannotExtractSdkVersionFromPackageId, packageId));
Microsoft.Extensions.AI.AzureAIInference (1)
AzureAIInferenceEmbeddingGenerator.cs (1)
163throw new FormatException("The input is not a valid Base64 string of encoded floats.");
Microsoft.Extensions.Compliance.Abstractions (1)
Classification\DataClassificationTypeConverter.cs (1)
58throw new FormatException($"Invalid data classification format: '{stringValue}'.");
Microsoft.Extensions.Configuration.CommandLine (1)
CommandLineConfigurationProvider.cs (1)
116throw new FormatException(SR.Format(SR.Error_ShortSwitchNotDefined, currentArg));
Microsoft.Extensions.Configuration.Ini (2)
IniStreamConfigurationProvider.cs (2)
64throw new FormatException(SR.Format(SR.Error_UnrecognizedLineFormat, rawLine)); 78throw new FormatException(SR.Format(SR.Error_KeyIsDuplicated, key));
Microsoft.Extensions.Configuration.Json (3)
JsonConfigurationFileParser.cs (3)
35throw new FormatException(SR.Format(SR.Error_InvalidTopLevelJSONElement, doc.RootElement.ValueKind)); 103throw new FormatException(SR.Format(SR.Error_KeyIsDuplicated, key)); 109throw new FormatException(SR.Format(SR.Error_UnsupportedJSONToken, value.ValueKind));
Microsoft.Extensions.Configuration.Xml (4)
XmlStreamConfigurationProvider.cs (4)
166throw new FormatException(SR.Format(SR.Error_UnsupportedNodeType, reader.NodeType, GetLineInfo(reader))); 218throw new FormatException(SR.Format(SR.Error_NamespaceIsNotSupported, GetLineInfo(reader))); 242throw new FormatException(SR.Format(SR.Error_NamespaceIsNotSupported, GetLineInfo(reader))); 405throw new FormatException(SR.Format(SR.Error_KeyIsDuplicated, key, lineInfo));
Microsoft.Extensions.DependencyModel (15)
DependencyContextJsonReader.cs (14)
203throw new FormatException(SR.NoRuntimeTarget); 220throw new FormatException(SR.NoTargetsSection); 228throw new FormatException(SR.Format(SR.TargetNotFound, runtimeTargetName)); 359throw new FormatException(SR.Format(SR.RequiredFieldNotSpecified, nameof(targetName))); 382throw new FormatException(SR.Format(SR.RequiredFieldNotSpecified, nameof(targetLibraryName))); 461throw new FormatException(SR.Format(SR.RequiredFieldNotSpecified, nameof(name))); 465throw new FormatException(SR.Format(SR.RequiredFieldNotSpecified, nameof(version))); 488throw new FormatException(SR.Format(SR.RequiredFieldNotSpecified, nameof(libraryName))); 515throw new FormatException(SR.Format(SR.RequiredFieldNotSpecified, nameof(path))); 555throw new FormatException(SR.Format(SR.RequiredFieldNotSpecified, nameof(runtimePath))); 606throw new FormatException(SR.Format(SR.RequiredFieldNotSpecified, nameof(path))); 646throw new FormatException(SR.Format(SR.RequiredFieldNotSpecified, nameof(libraryName))); 700throw new FormatException(SR.Format(SR.RequiredFieldNotSpecified, nameof(type))); 727throw new FormatException(SR.Format(SR.RequiredFieldNotSpecified, nameof(runtime)));
Utf8JsonReaderExtensions.cs (1)
142return new FormatException($"Unexpected character encountered, excepted '{expected}' " +
Microsoft.Maui.Controls (8)
BindingExpression.cs (3)
231 throw new FormatException("Path contains an empty part"); 240 throw new FormatException("Indexer did not contain closing bracket"); 244 throw new FormatException("Indexer did not contain arguments");
Shapes\PathFigureCollectionConverter.cs (3)
72 throw new FormatException("IllegalToken"); 432 throw new FormatException(string.Format("UnexpectedToken \"{0}\" into {1}", currentPathString, currentIndex - 1)); 566 throw new FormatException(string.Format("UnexpectedToken \"{0}\" into {1}", start, currentPathString));
VisualElement\VisualElement.cs (2)
227 throw new FormatException("Format for transform is 'none | transform(value) [transform(value) ]*'"); 264 throw new FormatException("Invalid transform name");
Microsoft.ML.Core (4)
Utilities\Contracts.cs (4)
374=> Process(new FormatException(msg)); 376=> Process(new FormatException(msg), ctx); 378=> Process(new FormatException(GetMsg(msg, args))); 380=> Process(new FormatException(GetMsg(msg, args)), ctx);
Microsoft.ML.CpuMath (4)
src\Microsoft.ML.Core\Utilities\Contracts.cs (4)
374=> Process(new FormatException(msg)); 376=> Process(new FormatException(msg), ctx); 378=> Process(new FormatException(GetMsg(msg, args))); 380=> Process(new FormatException(GetMsg(msg, args)), ctx);
Microsoft.ML.Tokenizers (6)
Model\CodeGenTokenizer.cs (1)
1787throw new FormatException($"Invalid format of merge file at line: \"{line}\"");
Model\EnglishRobertaTokenizer.cs (1)
219throw new FormatException($"Invalid format of merge file at line: \"{line}\"");
Model\TiktokenTokenizer.cs (3)
176throw new FormatException($"Invalid format in the BPE vocab file stream"); 213throw new FormatException($"Invalid format in the BPE vocab file stream"); 222throw new FormatException($"Can't parse {line.Substring(spaceIndex)} to integer");
Utils\Helpers.netcoreapp.cs (1)
40throw new FormatException($"Invalid base64 string '{base64String.Substring(offset, length)}'");
Microsoft.Net.Http.Headers (9)
CacheControlHeaderValue.cs (1)
495throw new FormatException("No cache directives found.");
ContentDispositionHeaderValue.cs (1)
345throw new FormatException(string.Format(CultureInfo.InvariantCulture,
EntityTagHeaderValue.cs (1)
65throw new FormatException("Invalid ETag name");
HeaderUtilities.cs (2)
80throw new FormatException(string.Format(CultureInfo.InvariantCulture, "Invalid token '{0}'.", value)); 712throw new FormatException($"Invalid control character '{segment[i]}' in input.");
HttpHeaderParser.cs (2)
41throw new FormatException(string.Format(CultureInfo.InvariantCulture, 142throw new FormatException(string.Format(CultureInfo.InvariantCulture,
MediaTypeHeaderValue.cs (1)
665throw new FormatException(string.Format(CultureInfo.InvariantCulture, "Invalid media type '{0}'.", mediaType));
NameValueHeaderValue.cs (1)
486throw new FormatException(string.Format(CultureInfo.InvariantCulture, "The header value is invalid: '{0}'", value));
PresentationBuildTasks (7)
src\Microsoft.DotNet.Wpf\src\PresentationCore\System\Windows\Media\ParsersCommon.cs (2)
138throw new FormatException(SR.Parsers_IllegalToken); 195throw new System.FormatException(SR.Format(SR.Parser_UnexpectedToken, _pathString, _curIndex - 1));
src\Microsoft.DotNet.Wpf\src\PresentationFramework\MS\Internal\Globalization\LocalizationComments.cs (5)
116throw new FormatException(SR.Format(SR.InvalidLocCommentTarget, input)); 144throw new FormatException(SR.Format(SR.InvalidLocCommentValue, currentPair.PropertyName, input)); 170throw new FormatException(SR.Format(SR.InvalidLocCommentValue, currentPair.PropertyName, input)); 192throw new FormatException(SR.Format(SR.UnmatchedLocComment, input)); 266throw new FormatException(SR.Format(SR.InvalidLocalizabilityValue, value));
PresentationCore (17)
System\Windows\FontStretchConverter.cs (1)
70throw new FormatException(SR.Parsers_IllegalToken);
System\Windows\FontStyleConverter.cs (1)
70throw new FormatException(SR.Parsers_IllegalToken);
System\Windows\FontWeightConverter.cs (1)
70throw new FormatException(SR.Parsers_IllegalToken);
System\Windows\Media\CacheMode.cs (1)
29throw new FormatException(SR.Parsers_IllegalToken);
System\Windows\Media\FamilyMap.cs (1)
221throw new FormatException(SR.CompositeFontInvalidUnicodeRange);
System\Windows\Media\Parsers.cs (10)
35throw new FormatException(SR.Parsers_IllegalToken); 87throw new FormatException(SR.Parsers_IllegalToken); 95throw new FormatException(SR.Parsers_IllegalToken); 133throw new FormatException(SR.Parsers_IllegalToken); 143throw new FormatException(SR.Parsers_IllegalToken); 164throw new FormatException(SR.Parsers_IllegalToken); 204throw new FormatException(SR.Parsers_IllegalToken); 226throw new FormatException(SR.Parsers_IllegalToken); 249throw new FormatException(SR.Parser_Empty); 282throw new FormatException(SR.Parsers_IllegalToken);
System\Windows\Media\ParsersCommon.cs (2)
138throw new FormatException(SR.Parsers_IllegalToken); 195throw new System.FormatException(SR.Format(SR.Parser_UnexpectedToken, _pathString, _curIndex - 1));
PresentationFramework (13)
MS\Internal\Globalization\LocalizationComments.cs (5)
116throw new FormatException(SR.Format(SR.InvalidLocCommentTarget, input)); 144throw new FormatException(SR.Format(SR.InvalidLocCommentValue, currentPair.PropertyName, input)); 170throw new FormatException(SR.Format(SR.InvalidLocCommentValue, currentPair.PropertyName, input)); 192throw new FormatException(SR.Format(SR.UnmatchedLocComment, input)); 266throw new FormatException(SR.Format(SR.InvalidLocalizabilityValue, value));
System\Windows\Annotations\Annotation.cs (3)
640throw new FormatException(SR.Format(SR.InvalidAttributeValue, AnnotationXmlConstants.Attributes.TypeName)); 651throw new FormatException(SR.Format(SR.InvalidAttributeValue, AnnotationXmlConstants.Attributes.TypeName)); 658throw new FormatException(SR.Format(SR.InvalidAttributeValue, AnnotationXmlConstants.Attributes.TypeName));
System\Windows\Controls\VirtualizationCacheLengthConverter.cs (1)
212throw new FormatException(SR.Format(SR.InvalidStringVirtualizationCacheLength, s));
System\Windows\CornerRadiusConverter.cs (1)
184throw new FormatException(SR.Format(SR.InvalidStringCornerRadius, s));
System\Windows\LengthConverter.cs (1)
225throw new FormatException(SR.Format(SR.LengthFormatError, span.ToString()));
System\Windows\ThicknessConverter.cs (2)
196throw new FormatException(SR.Format(SR.InvalidStringThickness, s)); 210_ => throw new FormatException(SR.Format(SR.InvalidStringThickness, s)),
ReachFramework (2)
PrintConfig\PrintSchema.cs (2)
2445throw new FormatException(errMsg); 2480throw new FormatException(errMsg);
System.ComponentModel.TypeConverter (1)
System\ComponentModel\CharConverter.cs (1)
55throw new FormatException(SR.Format(SR.ConvertInvalidPrimitive, text, nameof(Char)));
System.Data.Common (5)
System\Data\SQLTypes\SQLDecimal.cs (5)
1022throw new FormatException(SQLResource.FormatMessage); 1062throw new FormatException(SQLResource.FormatMessage); 1089throw new FormatException(SQLResource.FormatMessage); 1110throw new FormatException(SQLResource.FormatMessage); 1115throw new FormatException(SQLResource.FormatMessage);
System.IO.Packaging (6)
System\IO\Packaging\FileFormatException.cs (4)
24: base(SR.FileFormatException) 33: base(message ?? SR.FileFormatException) 56: base( 74: base(message ?? SR.FileFormatException)
System\IO\Packaging\ZipPackage.cs (2)
200throw new FormatException(SR.DuplicatePiecesFound); 1141throw new FormatException(SR.BadPackageFormat);
System.Net.Http (15)
System\Net\Http\Headers\HeaderUtilities.cs (3)
149throw new FormatException(SR.Format(CultureInfo.InvariantCulture, SR.net_http_headers_invalid_value, value)); 160throw new FormatException(SR.Format(CultureInfo.InvariantCulture, SR.net_http_headers_invalid_value, value)); 171throw new FormatException(SR.Format(CultureInfo.InvariantCulture, SR.net_http_headers_invalid_value, value));
System\Net\Http\Headers\HttpHeaderParser.cs (1)
61throw new FormatException(SR.Format(System.Globalization.CultureInfo.InvariantCulture, SR.net_http_headers_invalid_value,
System\Net\Http\Headers\HttpHeaders.cs (3)
1037throw new FormatException(SR.Format(System.Globalization.CultureInfo.InvariantCulture, SR.net_http_headers_single_value_header, descriptor.Name)); 1088throw new FormatException(SR.Format(SR.net_http_headers_invalid_header_name, name)); 1139throw new FormatException(SR.net_http_headers_no_newlines);
System\Net\Http\Headers\HttpRequestHeaders.cs (1)
119throw new FormatException(SR.net_http_headers_invalid_host_header);
System\Net\Http\Headers\MediaTypeHeaderValue.cs (1)
284throw new FormatException(SR.Format(System.Globalization.CultureInfo.InvariantCulture, SR.net_http_headers_invalid_value, mediaType));
System\Net\Http\Headers\NameValueHeaderValue.cs (1)
380throw new FormatException(SR.Format(System.Globalization.CultureInfo.InvariantCulture, SR.net_http_headers_invalid_value, value));
System\Net\Http\Headers\ProductInfoHeaderValue.cs (1)
91throw new FormatException(SR.Format(System.Globalization.CultureInfo.InvariantCulture, SR.net_http_headers_invalid_value, input.Substring(index)));
System\Net\Http\Headers\ViaHeaderValue.cs (1)
264throw new FormatException(SR.Format(System.Globalization.CultureInfo.InvariantCulture, SR.net_http_headers_invalid_value, receivedBy));
System\Net\Http\Headers\WarningHeaderValue.cs (1)
299throw new FormatException(SR.Format(SR.net_http_headers_invalid_value, agent));
System\Net\Http\HttpMethod.cs (1)
34throw new FormatException(SR.net_http_httpmethod_format_error);
System\Net\Http\HttpResponseMessage.cs (1)
95throw new FormatException(SR.net_http_reasonphrase_format_error);
System.Net.Mail (75)
System\Net\Base64Stream.cs (1)
103throw new FormatException(SR.MailBase64InvalidCharacter);
System\Net\BufferBuilder.cs (1)
90throw new FormatException(SR.Format(SR.MailHeaderFieldInvalidCharacter, c));
System\Net\Mail\DomainLiteralReader.cs (2)
78throw new FormatException(SR.Format(SR.MailHeaderFieldInvalidCharacter, data[index])); 97throw new FormatException(SR.Format(SR.MailHeaderFieldInvalidCharacter,
System\Net\Mail\DotAtomReader.cs (3)
60throw new FormatException(SR.Format(SR.MailHeaderFieldInvalidCharacter, data[index])); 72throw new FormatException(SR.Format(SR.MailHeaderFieldInvalidCharacter, MailBnfHelper.ConsecutiveDots)); 85throw new FormatException(SR.Format(SR.MailHeaderFieldInvalidCharacter, MailBnfHelper.Dot));
System\Net\Mail\MailAddressParser.cs (5)
102throw new FormatException(SR.MailAddressInvalidFormat); 138throw new FormatException(SR.Format(SR.MailHeaderFieldInvalidCharacter, 183throw new FormatException(SR.MailAddressInvalidFormat); 318throw new FormatException(SR.Format(SR.MailHeaderFieldInvalidCharacter, data[index])); 401throw new FormatException(SR.Format(SR.MailHeaderFieldInvalidCharacter, data[index]));
System\Net\Mail\MailBnfHelper.cs (8)
128throw new FormatException(SR.Format(SR.MailHeaderFieldInvalidCharacter, data[offset])); 140throw new FormatException(SR.Format(SR.MailHeaderFieldInvalidCharacter, data[offset])); 152throw new FormatException(SR.InvalidHeaderName); 197throw new FormatException(SR.Format(SR.MailHeaderFieldInvalidCharacter, data[offset])); 202throw new FormatException(SR.Format(SR.MailHeaderFieldInvalidCharacter, data[offset])); 210throw new FormatException(SR.MailHeaderFieldMalformedHeader); 236throw new FormatException(SR.Format(SR.MailHeaderFieldInvalidCharacter, span[i])); 348throw new FormatException(SR.Format(SR.MailHeaderFieldInvalidCharacter, ch));
System\Net\Mail\QuotedPairReader.cs (1)
61throw new FormatException(SR.Format(SR.MailHeaderFieldInvalidCharacter, data[index]));
System\Net\Mail\QuotedStringFormatReader.cs (3)
83throw new FormatException(SR.Format(SR.MailHeaderFieldInvalidCharacter, data[index])); 102throw new FormatException(SR.Format(SR.MailHeaderFieldInvalidCharacter, MailBnfHelper.Quote)); 165throw new FormatException(SR.Format(SR.MailHeaderFieldInvalidCharacter, data[index]));
System\Net\Mail\SmtpReplyReaderFactory.cs (6)
134throw new FormatException(SR.SmtpInvalidResponse); 151throw new FormatException(SR.SmtpInvalidResponse); 168throw new FormatException(SR.SmtpInvalidResponse); 193throw new FormatException(SR.SmtpInvalidResponse); 217throw new FormatException(SR.SmtpInvalidResponse); 247throw new FormatException(SR.SmtpInvalidResponse);
System\Net\Mail\WhitespaceReader.cs (5)
51throw new FormatException(SR.MailAddressInvalidFormat); 82throw new FormatException(SR.MailAddressInvalidFormat); 157throw new FormatException(SR.Format(SR.MailHeaderFieldInvalidCharacter, 179throw new FormatException(SR.Format(SR.MailHeaderFieldInvalidCharacter, data[index])); 206throw new FormatException(SR.Format(SR.MailHeaderFieldInvalidCharacter, MailBnfHelper.EndComment));
System\Net\Mime\ContentDisposition.cs (6)
37throw new FormatException(SR.ContentDispositionInvalid); 265throw new FormatException(SR.MailHeaderFieldMalformedHeader); 284throw new FormatException(SR.Format(SR.MailHeaderFieldInvalidCharacter, _disposition[offset - 1])); 299throw new FormatException(SR.MailHeaderFieldMalformedHeader); 306throw new FormatException(SR.ContentDispositionInvalid); 317throw new FormatException(SR.ContentDispositionInvalid);
System\Net\Mime\ContentType.cs (10)
100throw new FormatException(SR.MediaTypeInvalid); 105throw new FormatException(SR.MediaTypeInvalid); 229throw new FormatException(SR.ContentTypeInvalid); 235throw new FormatException(SR.ContentTypeInvalid); 242throw new FormatException(SR.ContentTypeInvalid); 254throw new FormatException(SR.ContentTypeInvalid); 260throw new FormatException(SR.ContentTypeInvalid); 265throw new FormatException(SR.ContentTypeInvalid); 274throw new FormatException(SR.ContentTypeInvalid); 284throw new FormatException(SR.ContentTypeInvalid);
System\Net\Mime\HeaderCollection.cs (1)
77throw new FormatException(SR.InvalidHeaderName);
System\Net\Mime\QEncodedStream.cs (6)
97throw new FormatException(SR.Format(SR.InvalidHexDigit, b1)); 99throw new FormatException(SR.Format(SR.InvalidHexDigit, b2)); 114throw new FormatException(SR.Format(SR.InvalidHexDigit, b1)); 116throw new FormatException(SR.Format(SR.InvalidHexDigit, b2)); 167throw new FormatException(SR.Format(SR.InvalidHexDigit, b1)); 169throw new FormatException(SR.Format(SR.InvalidHexDigit, b2));
System\Net\Mime\QuotedPrintableStream.cs (6)
126throw new FormatException(SR.Format(SR.InvalidHexDigit, b1)); 128throw new FormatException(SR.Format(SR.InvalidHexDigit, b2)); 143throw new FormatException(SR.Format(SR.InvalidHexDigit, b1)); 145throw new FormatException(SR.Format(SR.InvalidHexDigit, b2)); 188throw new FormatException(SR.Format(SR.InvalidHexDigit, b1)); 190throw new FormatException(SR.Format(SR.InvalidHexDigit, b2));
System\Net\Mime\SmtpDateTime.cs (11)
181throw new FormatException(SR.MailDateInvalidFormat); 190throw new FormatException(SR.MailDateInvalidFormat); 195throw new FormatException(SR.MailDateInvalidFormat); 203throw new FormatException(SR.MailDateInvalidFormat); 218throw new FormatException(SR.Format(SR.MailHeaderFieldInvalidCharacter, value)); 233throw new FormatException(SR.MailDateInvalidFormat); 243throw new FormatException(SR.Format(SR.MailHeaderFieldInvalidCharacter, data)); 253throw new FormatException(SR.Format(SR.MailHeaderFieldInvalidCharacter, data)); 264throw new FormatException(SR.MailDateInvalidFormat); 284throw new FormatException(SR.MailDateInvalidFormat); 345throw new FormatException(SR.MailDateInvalidFormat);
System.Net.NetworkInformation (1)
System\Net\NetworkInformation\PhysicalAddress.cs (1)
81throw new FormatException(SR.Format(SR.net_bad_mac_address, new string(address)));
System.Net.Primitives (4)
System\Net\CookieException.cs (1)
21public CookieException(string? message) : base(message)
System\Net\IPEndPoint.cs (1)
144throw new FormatException(SR.bad_endpoint_string);
System\Net\IPNetwork.cs (2)
151throw new FormatException(SR.net_bad_ip_network); 167throw new FormatException(SR.net_bad_ip_network);
System.Net.Requests (8)
System\Net\FtpControlStream.cs (7)
910throw new FormatException(SR.Format(SR.net_ftp_response_invalid_format, responseString)); 996throw new FormatException(SR.Format(SR.net_ftp_invalid_response_filename, filename)); 1003throw new FormatException(SR.Format(SR.net_ftp_invalid_response_filename, filename)); 1062throw new FormatException(SR.Format(SR.net_ftp_response_invalid_format, responseString)); 1084throw new FormatException(SR.Format(SR.net_ftp_response_invalid_format, responseString)); 1091throw new FormatException(SR.Format(SR.net_ftp_response_invalid_format, responseString)); 1152throw new FormatException(SR.net_ftp_no_newlines);
System\Net\FtpWebRequest.cs (1)
493throw new FormatException(SR.net_ftp_no_newlines);
System.Private.CoreLib (90)
src\libraries\System.Private.CoreLib\src\System\Buffers\StandardFormat.cs (2)
116return throws ? throw new FormatException(SR.Format(SR.Argument_CannotParsePrecision, MaxPrecision)) : false; 121return throws ? throw new FormatException(SR.Format(SR.Argument_PrecisionTooLarge, MaxPrecision)) : false;
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlDecoder.cs (7)
92throw new FormatException(SR.Format_BadBase64Char); 130throw new FormatException(SR.Format_BadBase64Char); 148throw new FormatException(SR.Format_BadBase64Char); 180return status == OperationStatus.Done ? ret : throw new FormatException(SR.Format_BadBase64Char); 347throw new FormatException(SR.Format_BadBase64Char); 365throw new FormatException(SR.Format_BadBase64Char); 395return status == OperationStatus.Done ? ret : throw new FormatException(SR.Format_BadBase64Char);
src\libraries\System.Private.CoreLib\src\System\Convert.cs (5)
496throw new FormatException(SR.Format_NeedSingleChar); 2853throw new FormatException(SR.Format_BadBase64Char); 2911throw new FormatException(SR.Format_BadBase64Char); 2948throw new FormatException(SR.Format_BadHexLength); 2953throw new FormatException(SR.Format_BadHexChar);
src\libraries\System.Private.CoreLib\src\System\DateOnly.cs (5)
696case ParseFailureKind.Argument_BadFormatSpecifier: throw new FormatException(SR.Argument_BadFormatSpecifier); 697case ParseFailureKind.Format_BadDateOnly: throw new FormatException(SR.Format(SR.Format_BadDateOnly, s.ToString())); 700throw new FormatException(SR.Format(SR.Format_DateTimeOnlyContainsNoneDateParts, s.ToString(), nameof(DateOnly))); 768_ => throw new FormatException(SR.Format_InvalidString), 822throw new FormatException(SR.Format(SR.Format_DateTimeOnlyContainsNoneDateParts, format.ToString(), nameof(DateOnly)));
src\libraries\System.Private.CoreLib\src\System\Enum.cs (1)
2154new FormatException(SR.Format_InvalidEnumFormatSpecification);
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormat.cs (14)
318throw new FormatException(SR.Format_InvalidString); 330throw new FormatException(SR.Format(SR.Format_BadQuote, quoteChar)); 524throw new FormatException(SR.Format_InvalidString); 706throw new FormatException(SR.Format_InvalidString); 730throw new FormatException(SR.Format_InvalidString); 914_ => throw new FormatException(SR.Format_InvalidString), 1163throw new FormatException(SR.Format_InvalidString); 1189throw new FormatException(SR.Format_InvalidString); 1210throw new FormatException(SR.Format(SR.Format_BadQuote, quoteChar)); 1232throw new FormatException(SR.Format_InvalidString); 1261throw new FormatException(SR.Format_InvalidString); 1282throw new FormatException(SR.Format(SR.Format_BadQuote, quoteChar)); 1299throw new FormatException(SR.Format_InvalidString); 1768throw new FormatException(SR.Format_InvalidString);
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeParse.cs (13)
5204return new FormatException(SR.Format(SR.Format_BadDatePattern, new string(result.failureSpanArgument))); 5206return new FormatException(SR.Format(SR.Format_BadDateTime, new string(result.failureSpanArgument))); 5208return new FormatException(SR.Format(SR.Format_BadDateTimeCalendar, new string(result.failureSpanArgument), result.calendar)); 5210return new FormatException(SR.Format(SR.Format_BadDayOfWeek, new string(result.failureSpanArgument))); 5212return new FormatException(SR.Format(SR.Format_BadFormatSpecifier, new string(result.failureSpanArgument))); 5214return new FormatException(SR.Format(SR.Format_BadQuote, (char)result.failureIntArgument)); 5216return new FormatException(SR.Format(SR.Format_DateOutOfRange, new string(result.failureSpanArgument))); 5218return new FormatException(SR.Format(SR.Format_MissingIncompleteDate, new string(result.failureSpanArgument))); 5220return new FormatException(SR.Format_NoFormatSpecifier); 5222return new FormatException(SR.Format(SR.Format_OffsetOutOfRange, new string(result.failureSpanArgument))); 5224return new FormatException(SR.Format(SR.Format_RepeatDateTimePattern, (char)result.failureIntArgument)); 5226return new FormatException(SR.Format(SR.Format_UnknownDateTimeWord, new string(result.failureSpanArgument), result.failureIntArgument)); 5228return new FormatException(SR.Format(SR.Format_UTCOutOfRange, new string(result.failureSpanArgument)));
src\libraries\System.Private.CoreLib\src\System\Globalization\TimeSpanFormat.cs (3)
40throw new FormatException(SR.Format_InvalidString); 72throw new FormatException(SR.Format_InvalidString); 451throw new FormatException(SR.Format_InvalidString);
src\libraries\System.Private.CoreLib\src\System\Globalization\TimeSpanParse.cs (5)
513throw new FormatException(SR.Format_NoFormatSpecifier); 523throw new FormatException(SR.Format(SR.Format_BadQuote, failingCharacter)); 533throw new FormatException(SR.Format_InvalidString); 564throw new FormatException(SR.Format(SR.Format_BadTimeSpan, new string(_originalTimeSpanString))); 574throw new FormatException(SR.Format(SR.Format_BadFormatSpecifier, formatSpecifierCharacter));
src\libraries\System.Private.CoreLib\src\System\Guid.cs (3)
228throw new FormatException(failureKind switch 398_ => throw new FormatException(SR.Format_InvalidGuidFormatSpecification), 1753throw new FormatException(SR.Format_InvalidGuidFormatSpecification);
src\libraries\System.Private.CoreLib\src\System\IO\BinaryReader.cs (2)
569throw new FormatException(SR.Format_Bad7BitInt); 609throw new FormatException(SR.Format_Bad7BitInt);
src\libraries\System.Private.CoreLib\src\System\Number.Parsing.cs (1)
1066throw new FormatException(errorMessage);
src\libraries\System.Private.CoreLib\src\System\ParseNumbers.cs (6)
45throw new FormatException(SR.Format_EmptyInputString); 80throw new FormatException(SR.Format_NoParsibleDigits); 86throw new FormatException(SR.Format_ExtraJunkAtEnd); 133throw new FormatException(SR.Format_EmptyInputString); 169throw new FormatException(SR.Format_NoParsibleDigits); 175throw new FormatException(SR.Format_ExtraJunkAtEnd);
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.Core.cs (3)
164throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesNameInvalidOffset, numBytesToSkip)); 171throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dPos)); 197throw new FormatException(SR.BadImageFormat_ResourceNameCorrupted);
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (5)
226throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesNameInvalidOffset, r)); 322throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataPos)); 420throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataOffset)); 440throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataOffset)); 461throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataPos));
src\libraries\System.Private.CoreLib\src\System\ThrowHelper.cs (6)
608throw new FormatException(SR.Argument_BadFormatSpecifier); 614throw new FormatException(SR.Format_NeedSingleChar); 620throw new FormatException(SR.Format(SR.Format_BadBoolean, new string(value))); 668throw new FormatException(SR.Format_InvalidString); 674throw new FormatException(SR.Format(SR.Format_InvalidStringWithOffsetAndReason, offset, GetResourceString(resource))); 680throw new FormatException(SR.Format_IndexOutOfRange);
src\libraries\System.Private.CoreLib\src\System\TimeOnly.cs (5)
866case ParseFailureKind.Argument_BadFormatSpecifier: throw new FormatException(SR.Argument_BadFormatSpecifier); 867case ParseFailureKind.Format_BadTimeOnly: throw new FormatException(SR.Format(SR.Format_BadTimeOnly, s.ToString())); 870throw new FormatException(SR.Format(SR.Format_DateTimeOnlyContainsNoneDateParts, s.ToString(), nameof(TimeOnly))); 940_ => throw new FormatException(SR.Format_InvalidString), 992throw new FormatException(SR.Format(SR.Format_DateTimeOnlyContainsNoneDateParts, format.ToString(), nameof(TimeOnly)));
src\System\Attribute.CoreCLR.cs (1)
432throw new FormatException(
src\System\Reflection\MdConstant.cs (3)
71throw new FormatException(SR.Arg_BadLiteralFormat); 100throw new FormatException(SR.Arg_BadLiteralFormat); 125_ => throw new FormatException(SR.Arg_BadLiteralFormat),
System.Private.DataContractSerialization (16)
System\Runtime\Serialization\Json\JsonReaderDelegator.cs (1)
153throw new FormatException(SR.Format(SR.JsonInvalidDateTimeString, originalDateTimeValue, JsonGlobals.DateTimeStartGuardWriter, JsonGlobals.DateTimeEndGuardWriter));
System\Runtime\Serialization\Json\XmlJsonReader.cs (1)
898throw new FormatException(SR.Format(SR.InvalidCharacterEncountered, (char)ch));
System\Text\Base64Encoding.cs (10)
33throw new FormatException(SR.Format(SR.XmlInvalidBase64Length, charCount.ToString())); 63throw new FormatException(SR.Format(SR.XmlInvalidBase64Length, count.ToString())); 80throw new FormatException(SR.Format(SR.XmlInvalidBase64Sequence, new string(pch, 0, 4), index + (int)(pch - _chars))); 90throw new FormatException(SR.Format(SR.XmlInvalidBase64Sequence, new string(pch, 0, 4), index + (int)(pch - _chars))); 120throw new FormatException(SR.Format(SR.XmlInvalidBase64Length, charCount.ToString())); 140throw new FormatException(SR.Format(SR.XmlInvalidBase64Sequence, new string(pch, 0, 4), charIndex + (int)(pch - _chars))); 150throw new FormatException(SR.Format(SR.XmlInvalidBase64Sequence, new string(pch, 0, 4), charIndex + (int)(pch - _chars))); 193throw new FormatException(SR.Format(SR.XmlInvalidBase64Length, charCount.ToString())); 212throw new FormatException(SR.Format(SR.XmlInvalidBase64Sequence, "?", charIndex + (int)(pch - _chars))); 222throw new FormatException(SR.Format(SR.XmlInvalidBase64Sequence, "?", charIndex + (int)(pch - _chars)));
System\Text\BinHexEncoding.cs (2)
15throw new FormatException(SR.Format(SR.XmlInvalidBinHexLength, charCount.ToString())); 45throw new FormatException(SR.Format(SR.XmlInvalidBinHexSequence, new string(chars, error, 2), error));
System\Xml\UniqueId.cs (2)
86throw new FormatException(SR.XmlInvalidUniqueId); 105throw new FormatException(SR.XmlInvalidUniqueId);
System.Private.Uri (1)
System\UriFormatException.cs (1)
20public UriFormatException(string? textString) : base(textString)
System.Private.Xml (28)
System\Xml\Schema\DataTypeImplementation.cs (1)
2041exception = new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, _dateTimeFlags.ToString()));
System\Xml\Schema\XmlValueConverter.cs (2)
616throw new FormatException(e.Message); 634throw new FormatException(e.Message);
System\Xml\Schema\XsdDateTime.cs (1)
133throw new FormatException(SR.Format(SR.XmlConvert_BadFormat, text, kinds));
System\Xml\Schema\XsdDuration.cs (1)
629return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, durationType));
System\Xml\XmlConvert.cs (23)
756throw new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Boolean")); 774return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Boolean")); 784throw new FormatException(SR.XmlConvert_NotOneCharString); 794return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Char")); 809return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Decimal")); 824return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Integer")); 840return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "SByte")); 855return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Int16")); 870return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Int32")); 885return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Int64")); 900return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Byte")); 916return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "UInt16")); 932return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "UInt32")); 948return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "UInt64")); 990return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Single")); 1037return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Double")); 1121throw new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "TimeSpan")); 1278exception = new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Guid")); 1282exception = new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Guid")); 1314throw new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Uri")); 1321throw new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Uri")); 1336return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Uri")); 1341return new FormatException(SR.Format(SR.XmlConvert_BadFormat, s, "Uri"));
System.Reflection.Context (1)
System\Reflection\Context\Custom\AttributeUtils.cs (1)
194throw new FormatException(SR.Format(SR.Format_AttributeUsage, attributeFilterType));
System.Resources.Extensions (6)
BinaryReaderExtensions.cs (1)
21throw new FormatException(SR.Format_Bad7BitInt32);
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (5)
226throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesNameInvalidOffset, r)); 322throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataPos)); 420throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataOffset)); 440throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataOffset)); 461throw new FormatException(SR.Format(SR.BadImageFormat_ResourcesDataInvalidOffset, dataPos));
System.Runtime.Numerics (3)
System\Number.BigInteger.cs (2)
36? new FormatException(SR.Overflow_ParseBigInteger) 659throw new FormatException(SR.Format_TooLarge);
System\ThrowHelper.cs (1)
33throw new FormatException(SR.Argument_BadFormatSpecifier);
System.ServiceModel.Syndication (1)
System\ServiceModel\Syndication\SyndicationFeed.cs (1)
306throw new FormatException(SR.Format(SR.InvalidSkipHourValue, value));
System.Text.Json (2)
System\Text\Json\ThrowHelper.cs (2)
710throw new FormatException(message) { Source = ExceptionSourceValueToRethrowAsJsonException }; 738throw new FormatException(message) { Source = ExceptionSourceValueToRethrowAsJsonException };
System.Windows.Forms (14)
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (4)
1659exception = new FormatException(SR.DataGridViewCell_FormattedValueTypeNull); 1663exception = new FormatException(SR.DataGridViewCell_FormattedValueHasWrongType); 3721throw new FormatException(SR.DataGridViewCell_FormattedValueTypeNull); 3726throw new FormatException(SR.DataGridViewCell_ValueTypeNull);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (2)
931new FormatException(SR.DataGridViewComboBoxCell_InvalidValue), 2411throw new FormatException(string.Format(CultureInfo.CurrentCulture, SR.Formatter_CantConvert, value, DisplayType));
System\Windows\Forms\Controls\ToolStrips\OpacityConverter.cs (1)
78throw new FormatException(
System\Windows\Forms\DataBinding\Binding.cs (1)
808throw new FormatException(SR.ListBindingFormatFailed);
System\Windows\Forms\Input\Cursor.cs (1)
453: new FormatException(SR.CursorCannotCovertToBytes);
System\Windows\Forms\Input\CursorConverter.cs (1)
118throw new FormatException(SR.CursorCannotCovertToString);
System\Windows\Forms\Input\KeysConverter.cs (1)
185throw new FormatException(SR.KeysConverterInvalidKeyCombination);
System\Windows\Forms\Internal\Formatter.cs (3)
72throw new FormatException(GetCantConvertMessage(value, targetType)); 225throw new FormatException(GetCantConvertMessage(value, targetType)); 374throw new FormatException(GetCantConvertMessage(value, targetType));
System.Xaml (2)
System\Xaml\XamlTypeName.cs (2)
101throw new FormatException(error); 116throw new FormatException(error);
xunit.console (3)
common\AssemblyResolution\Microsoft.Extensions.DependencyModel\DependencyContextJsonReader.cs (3)
103throw new FormatException("No runtime target found"); 118throw new FormatException("Dependency file does not have 'targets' section"); 124throw new FormatException($"Target with name {runtimeTargetName} not found");