5 types derived from FormatException
Microsoft.AspNetCore.Rewrite (1)
IISUrlRewrite\InvalidUrlRewriteFormatException.cs (1)
9internal sealed class InvalidUrlRewriteFormatException : FormatException
System.IO.Packaging (1)
System\IO\Packaging\FileFormatException.cs (1)
15public class FileFormatException : FormatException
System.Net.Primitives (1)
System\Net\CookieException.cs (1)
11public class CookieException : FormatException, ISerializable
System.Private.CoreLib (1)
src\libraries\System.Private.CoreLib\src\System\Reflection\CustomAttributeFormatException.cs (1)
12public class CustomAttributeFormatException : FormatException
System.Private.Uri (1)
System\UriFormatException.cs (1)
14public class UriFormatException : FormatException, ISerializable
579 instantiations of 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 (49)
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\IdentityModel\Claims\X509CertificateClaimSet.cs (1)
421throw new FormatException(string.Format(
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 (2)
Internal\GrpcProtocolHelpers.cs (1)
27throw new FormatException("Invalid base64 header value");
src\Grpc\JsonTranscoding\src\Shared\X509CertificateHelpers.cs (1)
113throw new FormatException(string.Format(
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.Identity.FunctionalTests (1)
src\Identity\Extensions.Core\src\Base32.cs (1)
93throw new FormatException();
Microsoft.AspNetCore.Mvc.Abstractions.Test (10)
ModelBinding\ModelStateDictionaryTest.cs (10)
963var exception = new FormatException("The supplied value is invalid for Length."); 983dictionary.TryAddModelError("key", new FormatException(), metadata); 1007dictionary.TryAddModelError("key", new FormatException(), metadata); 1035dictionary.TryAddModelError("key", new FormatException(), metadata); 1061dictionary.TryAddModelError("key", new FormatException(), metadata); 1076var exception = new FormatException("The value 'some value' is not valid for Length."); 1097dictionary.TryAddModelError("key", new FormatException(), metadata); 1122dictionary.TryAddModelError("key", new FormatException(), metadata); 1151dictionary.TryAddModelError("key", new FormatException(), metadata); 1178dictionary.TryAddModelError("key", new FormatException(), metadata);
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
DefaultApiDescriptionProviderTest.cs (1)
2698throw new FormatException($"{nameof(s)} is not in the correct format");
Microsoft.AspNetCore.Mvc.Core (2)
ModelBinding\Binders\TryParseModelBinder.cs (1)
136Expression.Call(AddModelErrorMethod, BindingContextExpression, Expression.Constant(new FormatException()))),
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 (52)
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 (4)
30throw new FormatException(Resources.FormatError_ModRewriteParseError("Too many tokens on line", lineNum)); 55throw new FormatException(Resources.FormatError_ModRewriteGeneralParseError(lineNum), formatException); 81throw new FormatException(Resources.FormatError_ModRewriteGeneralParseError(lineNum), formatException); 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\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.Build.Framework (1)
BinaryReaderExtensions.cs (1)
46throw new FormatException();
Microsoft.Build.Tasks.Core (1)
ManifestUtil\ApplicationManifest.cs (1)
310throw new FormatException();
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 (4)
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));
JsonConfigurationProvider.cs (1)
34throw new FormatException(SR.Error_JSONParseError, e);
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.Extensions.Identity.Core (1)
Base32.cs (1)
93throw new FormatException();
Microsoft.Maui.Controls (9)
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");
GridLengthTypeConverter.cs (1)
35 throw new FormatException();
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 (10)
Utilities\Contracts.cs (10)
370=> Process(new FormatException()); 372=> Process(new FormatException(), ctx); 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); 382=> Process(new FormatException(msg, inner)); 384=> Process(new FormatException(msg, inner), ctx); 386=> Process(new FormatException(GetMsg(msg, args), inner)); 388=> Process(new FormatException(GetMsg(msg, args), inner), ctx);
Microsoft.ML.CpuMath (10)
src\Microsoft.ML.Core\Utilities\Contracts.cs (10)
370=> Process(new FormatException()); 372=> Process(new FormatException(), ctx); 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); 382=> Process(new FormatException(msg, inner)); 384=> Process(new FormatException(msg, inner), ctx); 386=> Process(new FormatException(GetMsg(msg, args), inner)); 388=> Process(new FormatException(GetMsg(msg, args), inner), 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));
Microsoft.VisualBasic.Core (2)
Microsoft\VisualBasic\CompilerServices\Utils.LateBinder.vb (2)
290Throw New FormatException 328Throw New FormatException
MSBuildTaskHost (1)
BinaryReaderExtensions.cs (1)
46throw new FormatException();
PresentationBuildTasks (8)
src\Microsoft.DotNet.Wpf\src\PresentationCore\System\Windows\Media\ParsersCommon.cs (3)
138throw new FormatException(SR.Parsers_IllegalToken); 195throw new System.FormatException(SR.Format(SR.Parser_UnexpectedToken, _pathString, _curIndex - 1)); 434throw new System.FormatException(SR.Format(SR.Parser_UnexpectedToken, _pathString, start), except);
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 (19)
System\Windows\DurationConverter.cs (1)
80throw new FormatException($"{valueSpan} is not a valid value for {nameof(TimeSpan)}.", e);
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 (3)
138throw new FormatException(SR.Parsers_IllegalToken); 195throw new System.FormatException(SR.Format(SR.Parser_UnexpectedToken, _pathString, _curIndex - 1)); 434throw new System.FormatException(SR.Format(SR.Parser_UnexpectedToken, _pathString, start), except);
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 (4)
PrintConfig\PrintSchema.cs (2)
2445throw new FormatException(errMsg); 2480throw new FormatException(errMsg);
PrintConfig\PrtCap_Public.cs (1)
457return new FormatException(String.Format(CultureInfo.CurrentCulture,
PrintConfig\PrtTicket_Public.cs (1)
523return new FormatException(String.Format(CultureInfo.CurrentCulture,
System.ComponentModel.TypeConverter (9)
System\ComponentModel\BooleanConverter.cs (1)
39throw new FormatException(SR.Format(SR.ConvertInvalidPrimitive, (string)value, nameof(Boolean)), e);
System\ComponentModel\CharConverter.cs (1)
55throw new FormatException(SR.Format(SR.ConvertInvalidPrimitive, text, nameof(Char)));
System\ComponentModel\DateOnlyConverter.cs (1)
66throw new FormatException(SR.Format(SR.ConvertInvalidPrimitive, (string)value, nameof(DateOnly)), e);
System\ComponentModel\DateTimeConverter.cs (1)
70throw new FormatException(SR.Format(SR.ConvertInvalidPrimitive, (string)value, nameof(DateTime)), e);
System\ComponentModel\DateTimeOffsetConverter.cs (1)
70throw new FormatException(SR.Format(SR.ConvertInvalidPrimitive, (string)value, nameof(DateTimeOffset)), e);
System\ComponentModel\EnumConverter.cs (1)
104throw new FormatException(SR.Format(SR.ConvertInvalidPrimitive, (string)value, EnumType.Name), e);
System\ComponentModel\TimeOnlyConverter.cs (1)
66throw new FormatException(SR.Format(SR.ConvertInvalidPrimitive, (string)value, nameof(TimeOnly)), e);
System\ComponentModel\TimeSpanConverter.cs (1)
51throw new FormatException(SR.Format(SR.ConvertInvalidPrimitive, (string)value, nameof(TimeSpan)), e);
System\ComponentModel\VersionConverter.cs (1)
50throw new FormatException(SR.Format(SR.ConvertInvalidPrimitive, versionString, nameof(Version)), e);
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.Data.Odbc (1)
Common\System\Data\Common\AdapterUtil.Odbc.cs (1)
402e = new FormatException(message, inner);
System.IO.Packaging (2)
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 (77)
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 (6)
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])); 447throw new FormatException(SR.MailAddressInvalidFormat, e);
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 (7)
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); 329throw new FormatException(SR.ContentDispositionInvalid, exception);
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\IPAddressParser.cs (1)
63throw new FormatException(SR.dns_bad_ip_address, new SocketException(SocketError.InvalidArgument));
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 (91)
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\Emit\DynamicILGenerator.cs (1)
709throw 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.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.Security.Cryptography (1)
System\Security\Cryptography\Base64Transforms.cs (1)
390public static void ThrowBase64FormatException() => throw new FormatException();
System.ServiceModel.Syndication (1)
System\ServiceModel\Syndication\SyndicationFeed.cs (1)
306throw new FormatException(SR.Format(SR.InvalidSkipHourValue, value));
System.Text.Json (7)
System\Text\Json\Document\JsonElement.cs (4)
480throw new FormatException(); 530throw new FormatException(); 577throw new FormatException(); 629throw new FormatException();
System\Text\Json\ThrowHelper.cs (3)
654throw new FormatException { Source = ExceptionSourceValueToRethrowAsJsonException }; 710throw new FormatException(message) { Source = ExceptionSourceValueToRethrowAsJsonException }; 738throw new FormatException(message) { Source = ExceptionSourceValueToRethrowAsJsonException };
System.Windows.Forms (17)
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 (2)
67throw new FormatException( 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 (5)
72throw new FormatException(GetCantConvertMessage(value, targetType)); 225throw new FormatException(GetCantConvertMessage(value, targetType)); 374throw new FormatException(GetCantConvertMessage(value, targetType)); 390throw new FormatException(ex.Message, ex); 485throw new FormatException(ex.InnerException?.Message, ex.InnerException);
System.Xaml (2)
System\Xaml\XamlTypeName.cs (2)
101throw new FormatException(error); 116throw new FormatException(error);
UIAutomationTypes (2)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsCLR.cs (2)
2112throw new FormatException(/*SR.GetString(SR.CannotConvertIntToFloat)*/); 2119throw new FormatException(/*SR.GetString(SR.CannotConvertDoubleToDate)*/);
xunit.console (4)
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");
common\Json.cs (1)
761throw new FormatException();
812 references to FormatException
Aspire.Azure.Messaging.EventHubs (1)
EventHubsComponent.cs (1)
109catch (Exception ex) when (ex is FormatException or IndexOutOfRangeException)
Binding.Http.IntegrationTests (1)
BasicHttpBindingTests.4.0.0.cs (1)
308Assert.Throws<FormatException>(() =>
dotnet-svcutil-lib (123)
CommandProcessorOptions.cs (1)
187catch (FormatException fe)
FrameworkFork\Microsoft.Xml\Xml\BinaryXml\XmlBinaryReader.cs (9)
1143catch (FormatException e) 1233catch (FormatException e) 1328catch (FormatException e) 1423catch (FormatException e) 1518catch (FormatException e) 1613catch (FormatException e) 1708catch (FormatException e) 1748catch (FormatException e) 1795catch (FormatException e)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlReader.cs (9)
233catch (FormatException e) 251catch (FormatException e) 269catch (FormatException e) 287catch (FormatException e) 305catch (FormatException e) 323catch (FormatException e) 341catch (FormatException e) 359catch (FormatException e) 396catch (FormatException e)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlReaderAsync.cs (1)
75catch (FormatException e)
FrameworkFork\Microsoft.Xml\Xml\Core\XsdValidatingReader.cs (18)
468catch (FormatException e) 501catch (FormatException e) 534catch (FormatException e) 567catch (FormatException e) 600catch (FormatException e) 633catch (FormatException e) 666catch (FormatException e) 699catch (FormatException e) 737catch (FormatException e) 783catch (FormatException e) 818catch (FormatException e) 853catch (FormatException e) 888catch (FormatException e) 923catch (FormatException e) 958catch (FormatException e) 993catch (FormatException e) 1032catch (FormatException e) 1070catch (FormatException e)
FrameworkFork\Microsoft.Xml\Xml\Core\XsdValidatingReaderAsync.cs (4)
68catch (FormatException e) 109catch (FormatException e) 163catch (FormatException e) 205catch (FormatException e)
FrameworkFork\Microsoft.Xml\Xml\schema\DatatypeImplementation.cs (4)
615catch (FormatException e) 1104catch (FormatException e) 1348catch (FormatException e) 2582catch (FormatException e)
FrameworkFork\Microsoft.Xml\Xml\schema\Inference\infer.cs (14)
1487catch (FormatException) 1501catch (FormatException) 1518catch (FormatException) 1532catch (FormatException) 1549catch (FormatException) 1563catch (FormatException) 1580catch (FormatException) 1594catch (FormatException) 1629catch (FormatException) 1638catch (FormatException) 1656catch (FormatException) { } 1671catch (FormatException) 1685catch (FormatException) 2387catch (FormatException)
FrameworkFork\Microsoft.Xml\Xml\schema\Preprocessor.cs (4)
536catch (FormatException eInner) 2026catch (FormatException fe) 2069catch (FormatException fe) 2143catch (FormatException fx)
FrameworkFork\Microsoft.Xml\Xml\schema\SchemaCollectionPreprocessor.cs (1)
424catch (FormatException)
FrameworkFork\Microsoft.Xml\Xml\XmlConvert.cs (2)
1238catch (FormatException) 1478catch (FormatException)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\SchemaImporter.cs (2)
825catch (FormatException fe) 1161catch (FormatException fe)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializer.cs (6)
78catch (FormatException ex) 131catch (FormatException ex) 152catch (FormatException ex) 169catch (FormatException ex) 286catch (FormatException ex) 303catch (FormatException ex)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlReaderDelegator.cs (3)
360catch (FormatException exception) 556catch (FormatException exception) 585catch (FormatException exception)
FrameworkFork\System.Runtime.Serialization\System\Xml\ValueHandle.cs (4)
463catch (FormatException) 472catch (FormatException exception) 643catch (FormatException) 750catch (FormatException exception)
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBaseReader.cs (1)
1454catch (FormatException exception)
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBufferReader.cs (2)
476catch (FormatException exception) 498catch (FormatException exception)
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlConverter.cs (11)
80catch (FormatException exception) 109catch (FormatException exception) 137catch (FormatException exception) 165catch (FormatException exception) 193catch (FormatException exception) 221catch (FormatException exception) 258catch (FormatException exception) 282catch (FormatException exception) 303catch (FormatException exception) 324catch (FormatException exception) 353catch (FormatException exception)
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlDictionaryReader.cs (11)
732catch (FormatException exception) 763catch (FormatException exception) 794catch (FormatException exception) 1532catch (FormatException exception) 1548catch (FormatException exception) 1568catch (FormatException exception) 1588catch (FormatException exception) 1608catch (FormatException exception) 1628catch (FormatException exception) 1648catch (FormatException exception) 1668catch (FormatException exception)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\Fx.cs (1)
328catch (FormatException)
FrameworkFork\System.ServiceModel\System\IdentityModel\Tokens\KeyInfoSerializer.cs (1)
333return ((e is ArgumentException) || (e is FormatException) || (e is InvalidOperationException));
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageContent.cs (1)
110catch (FormatException formatException)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageEncoder.cs (1)
209catch (FormatException)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageFault.cs (1)
94catch (FormatException e)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageHeader.cs (1)
269catch (FormatException exception)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ReliableSessionBindingElementImporter.cs (1)
256catch (FormatException exception)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TextMessageEncoder.cs (1)
218catch (FormatException e)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransactionFlowBindingElementImporter.cs (1)
177catch (FormatException e)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\DataContractSerializerOperationFormatter.cs (1)
431catch (System.FormatException e)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\OperationFormatter.cs (2)
146catch (FormatException fe) 210catch (FormatException fe)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\PrimitiveOperationFormatter.cs (2)
397catch (FormatException fe) 438catch (FormatException fe)
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSSecurityTokenSerializer.cs (1)
206return ((e is ArgumentException) || (e is FormatException) || (e is InvalidOperationException));
FrameworkFork\System.ServiceModel\System\ServiceModel\XmlUtil.cs (1)
141catch (FormatException exception)
Infrastructure.Common (1)
xunit\WcfTestCase.cs (1)
83catch (FormatException e)
Microsoft.AspNetCore.Authentication.Test (1)
OpenIdConnect\OpenIdConnectTests.cs (1)
510Assert.Throws<FormatException>(() =>
Microsoft.AspNetCore.Components.Endpoints.Tests (2)
Binding\FormDataMapperTests.cs (2)
2267catch (FormatException) 2315catch (FormatException)
Microsoft.AspNetCore.Connections.Abstractions (1)
src\Shared\ParameterDefaultValue\ParameterDefaultValue.cs (1)
66catch (FormatException) when (parameter.ParameterType == typeof(DateTime))
Microsoft.AspNetCore.CookiePolicy.Test (1)
CookieChunkingTests.cs (1)
182Assert.Throws<FormatException>(() => new ChunkingCookieManager() { ThrowForPartialCookies = true }
Microsoft.AspNetCore.DataProtection.Abstractions (3)
src\Shared\WebEncoders\WebEncoders.cs (3)
43/// Throws <see cref="FormatException"/> if the input is malformed. 61/// Throws <see cref="FormatException"/> if the input is malformed. 117/// Throws <see cref="FormatException"/> if the input is malformed.
Microsoft.AspNetCore.DataProtection.Tests (1)
KeyManagement\XmlKeyManagerTests.cs (1)
592Assert.Throws<FormatException>(() => RunGetAllKeysCore(xml, new Mock<IActivator>().Object));
Microsoft.AspNetCore.Grpc.JsonTranscoding (2)
src\Grpc\JsonTranscoding\src\Shared\Legacy.cs (2)
128catch (FormatException) 211catch (FormatException)
Microsoft.AspNetCore.Grpc.Swagger (2)
src\Grpc\JsonTranscoding\src\Shared\Legacy.cs (2)
128catch (FormatException) 211catch (FormatException)
Microsoft.AspNetCore.Http.Abstractions.Tests (1)
HostStringTest.cs (1)
171Assert.Throws<FormatException>(() => HostString.MatchesAny("example.com:1abc", new StringSegment[] { "example.com" }));
Microsoft.AspNetCore.Http.Connections (3)
src\Shared\WebEncoders\WebEncoders.cs (3)
43/// Throws <see cref="FormatException"/> if the input is malformed. 61/// Throws <see cref="FormatException"/> if the input is malformed. 117/// Throws <see cref="FormatException"/> if the input is malformed.
Microsoft.AspNetCore.Http.Tests (3)
BindingAddressTests.cs (3)
16Assert.Throws<FormatException>(() => BindingAddress.Parse(url)); 30Assert.Throws<FormatException>(() => BindingAddress.Parse(url)); 40Assert.Throws<FormatException>(() => BindingAddress.Parse(url));
Microsoft.AspNetCore.HttpOverrides (1)
IPNetwork.cs (1)
119/// <exception cref="FormatException"><paramref name="networkSpan"/> is not in the correct format.</exception>
Microsoft.AspNetCore.HttpOverrides.Tests (2)
IPNetworkTest.cs (2)
96var ex = Assert.Throws<FormatException>(() => IPNetwork.Parse(input));
Microsoft.AspNetCore.Identity (2)
IdentityApiEndpointRouteBuilderExtensions.cs (2)
156catch (FormatException) 245catch (FormatException)
Microsoft.AspNetCore.Mvc.Abstractions (6)
ModelBinding\Metadata\ModelBindingMessageProvider.cs (4)
43/// <see cref="FormatException"/> or <see cref="OverflowException"/>, value is known, and error is associated 51/// <see cref="FormatException"/> or <see cref="OverflowException"/>, value is known, and error is associated 59/// <see cref="FormatException"/> or <see cref="OverflowException"/>, value is unknown, and error is associated 67/// <see cref="FormatException"/> or <see cref="OverflowException"/>, value is unknown, and error is associated
ModelBinding\ModelStateDictionary.cs (2)
198/// must be maintained for later use (even if it is for example a <see cref="FormatException"/>). 274if (exception is FormatException || exception is OverflowException)
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.Core (6)
Formatters\SystemTextJsonInputFormatter.cs (1)
80catch (Exception exception) when (exception is FormatException || exception is OverflowException)
ModelBinding\Binders\DecimalModelBinder.cs (1)
94var isFormatException = exception is FormatException;
ModelBinding\Binders\DoubleModelBinder.cs (1)
94var isFormatException = exception is FormatException;
ModelBinding\Binders\FloatModelBinder.cs (1)
94var isFormatException = exception is FormatException;
ModelBinding\Binders\SimpleTypeModelBinder.cs (1)
89var isFormatException = exception is FormatException;
ModelBinding\ModelBindingHelper.cs (1)
724catch (FormatException)
Microsoft.AspNetCore.Mvc.Core.Test (10)
ConsumesAttributeTests.cs (4)
28var exception = Assert.Throws<FormatException>(() => new ConsumesAttribute(contentType)); 45var ex = Assert.Throws<FormatException>(
ModelBinding\Binders\BodyModelBinderTests.cs (1)
259var expectedFormatException = new FormatException("bad format!");
ModelBinding\ModelBindingHelperTest.cs (3)
1182var ex = Assert.Throws<FormatException>( 1196Assert.Throws<FormatException>(
ProducesAttributeTests.cs (2)
100var ex = Assert.Throws<FormatException>(
Microsoft.AspNetCore.Mvc.Formatters.Xml (1)
XmlSerializerInputFormatter.cs (1)
154catch (InvalidOperationException exception) when (exception.InnerException is FormatException ||
Microsoft.AspNetCore.Mvc.Localization.Test (2)
HtmlLocalizerTest.cs (2)
148var exception = Assert.Throws<FormatException>(
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
NewtonsoftJsonInputFormatter.cs (1)
192if (exception is not null && exception is not (JsonException or OverflowException or FormatException))
Microsoft.AspNetCore.Mvc.ViewFeatures (3)
DefaultHtmlGenerator.cs (2)
1390when (exception is FormatException || exception.InnerException is FormatException)
ModelStateDictionaryExtensions.cs (1)
46/// must be maintained for later use (even if it is for example a <see cref="FormatException"/>).
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (4)
DefaultEditorTemplatesTest.cs (2)
1314var ex = Assert.Throws<FormatException>(() => helper.EditorFor(m => m.Property1));
Rendering\HtmlHelperCheckboxTest.cs (2)
81var ex = Assert.Throws<FormatException>(
Microsoft.AspNetCore.Rewrite (3)
ApacheModRewrite\FileParser.cs (2)
53catch (FormatException formatException) 79catch (FormatException formatException)
IISUrlRewrite\ServerVariables.cs (1)
18/// <exception cref="FormatException">Thrown when the server variable is unknown</exception>
Microsoft.AspNetCore.Rewrite.Tests (27)
ApacheModRewrite\ConditionPatternParserTest.cs (2)
97var ex = Assert.Throws<FormatException>(() => ConditionPatternParser.ParseActionCondition(input));
ApacheModRewrite\CookieActionFactoryTest.cs (4)
76var ex = Assert.Throws<FormatException>(() => CookieActionFactory.Create(flagValue)); 87var ex = Assert.Throws<FormatException>(() => CookieActionFactory.Create("NAME:VALUE:DOMAIN:" + badInt));
ApacheModRewrite\FlagParserTest.cs (2)
54var ex = Assert.Throws<FormatException>(() => FlagParser.Parse(input));
ApacheModRewrite\FormatExceptionTests.cs (2)
31var ex = Assert.Throws<FormatException>(() => FileParser.Parse(new StringReader(input)));
ApacheModRewrite\RewriteTokenizerTest.cs (4)
81var ex = Assert.Throws<FormatException>(() => Tokenizer.Tokenize("\\")); 88var ex = Assert.Throws<FormatException>(() => Tokenizer.Tokenize("\""));
ApacheModRewrite\RuleRegexParserTest.cs (2)
13Assert.Throws<FormatException>(() => RuleRegexParser.ParseRuleRegex(null)); 19Assert.Throws<FormatException>(() => RuleRegexParser.ParseRuleRegex(string.Empty));
ApacheModRewrite\TestStringParserTests.cs (2)
120var ex = Assert.Throws<FormatException>(() => TestStringParser.Parse(testString));
IISUrlRewrite\FormatExceptionHandlingTests.cs (2)
63var ex = Assert.Throws<FormatException>(() => new UrlRewriteFileParser().Parse(new StringReader(input), false));
IISUrlRewrite\InputParserTests.cs (3)
118Assert.Throws<FormatException>(() => new InputParser().ParseInputString(testString, UriMatchPart.Path)); 124Assert.Throws<FormatException>(() => new InputParser(null, false).ParseInputString("{apiMap:{R:1}}", UriMatchPart.Path)); 134Assert.Throws<FormatException>(() => new InputParser(maps, false).ParseInputString($"{{{undefinedMapName}:{{R:1}}}}", UriMatchPart.Path));
PatternSegments\DateTimeSegmentTests.cs (2)
37var ex = Assert.Throws<FormatException>(() => new DateTimeSegment(input));
UrlMatches\IntegerMatchTests.cs (2)
14var ex = Assert.Throws<FormatException>(() => new IntegerMatch("Not an int", IntegerOperationType.Equal));
Microsoft.AspNetCore.Server.HttpSys.Tests (2)
UrlPrefixTests.cs (2)
18Assert.Throws<FormatException>(() => UrlPrefix.Create(url)); 49Assert.Throws<FormatException>(() => UrlPrefix.Create(url));
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
KestrelServerTests.cs (2)
55var exception = Assert.Throws<FormatException>(() => StartDummyApplication(server));
Microsoft.AspNetCore.Shared.Tests (4)
src\Shared\WebEncoders\WebEncoders.cs (3)
43/// Throws <see cref="FormatException"/> if the input is malformed. 61/// Throws <see cref="FormatException"/> if the input is malformed. 117/// Throws <see cref="FormatException"/> if the input is malformed.
WebEncodersTests.cs (1)
33Assert.Throws<FormatException>(() =>
Microsoft.AspNetCore.SignalR.Client.Tests (1)
HttpConnectionTests.Negotiate.cs (1)
37return RunInvalidNegotiateResponseTest<FormatException>(ResponseUtils.CreateNegotiationContent(connectionId: string.Empty), "Invalid connection id.");
Microsoft.AspNetCore.SignalR.Common.Tests (2)
Internal\Formatters\BinaryMessageParserTests.cs (2)
68var ex = Assert.Throws<FormatException>(() =>
Microsoft.AspNetCore.WebUtilities (3)
src\Shared\WebEncoders\WebEncoders.cs (3)
43/// Throws <see cref="FormatException"/> if the input is malformed. 61/// Throws <see cref="FormatException"/> if the input is malformed. 117/// Throws <see cref="FormatException"/> if the input is malformed.
Microsoft.Build (6)
BackEnd\Components\Scheduler\SchedulingPlan.cs (1)
180catch (FormatException)
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (2)
775ex is FormatException || // bad string representation of a type 1201ex is FormatException || // bad string representation of a type
Evaluation\Expander.cs (1)
4121catch (FormatException)
ExceptionHandling.cs (1)
312|| e is FormatException
Logging\BinaryLogger\BuildEventArgsReader.cs (1)
241e is FormatException ||
Microsoft.Build.Engine.OM.UnitTests (1)
ExceptionHandling.cs (1)
312|| e is FormatException
Microsoft.Build.Engine.UnitTests (24)
Evaluation\SimpleVersion_Tests.cs (24)
237yield return new object[] { "", typeof(FormatException) }; // Input is empty 238yield return new object[] { "1,2,3,4", typeof(FormatException) }; // Input contains invalid separator 239yield return new object[] { "1.2.3.4.5", typeof(FormatException) }; // Input has more than 4 version components 241yield return new object[] { "1.", typeof(FormatException) }; // Input contains empty component 242yield return new object[] { "1.2,", typeof(FormatException) }; // Input contains empty component 243yield return new object[] { "1.2.3.", typeof(FormatException) }; // Input contains empty component 244yield return new object[] { "1.2.3.4.", typeof(FormatException) }; // Input contains empty component 246yield return new object[] { "NotAVersion", typeof(FormatException) }; // Input contains non-numeric value 247yield return new object[] { "b.2.3.4", typeof(FormatException) }; // Input contains non-numeric value 248yield return new object[] { "1.b.3.4", typeof(FormatException) }; // Input contains non-numeric value 249yield return new object[] { "1.2.b.4", typeof(FormatException) }; // Input contains non-numeric value 250yield return new object[] { "1.2.3.b", typeof(FormatException) }; // Input contains non-numeric value 252yield return new object[] { "2147483648.2.3.4", typeof(FormatException) }; // Input contains a value > int.MaxValue 253yield return new object[] { "1.2147483648.3.4", typeof(FormatException) }; // Input contains a value > int.MaxValue 254yield return new object[] { "1.2.2147483648.4", typeof(FormatException) }; // Input contains a value > int.MaxValue 255yield return new object[] { "1.2.3.2147483648", typeof(FormatException) }; // Input contains a value > int.MaxValue 258yield return new object[] { "2 .3. 4. \t\r\n15 ", typeof(FormatException) }; 259yield return new object[] { " 2 .3. 4. \t\r\n15 ", typeof(FormatException) }; 263yield return new object[] { "-1.2.3.4", typeof(FormatException) }; 264yield return new object[] { "1.-2.3.4", typeof(FormatException) }; 265yield return new object[] { "1.2.-3.4", typeof(FormatException) }; 266yield return new object[] { "1.2.3.-4", typeof(FormatException) }; 270yield return new object[] { "+1.+2.+3.+4", typeof(FormatException) }; 273yield return new object[] { "vv1.2.3.4", typeof(FormatException) };
Microsoft.Build.Framework (2)
LazyFormattedBuildEventArgs.cs (1)
208catch (FormatException ex)
VisualStudioLocationHelper.cs (1)
61catch (FormatException)
Microsoft.Build.Tasks.CodeAnalysis (1)
Vbc.cs (1)
371catch (FormatException e)
Microsoft.Build.Tasks.Core (16)
ExceptionHandling.cs (1)
312|| e is FormatException
GenerateApplicationManifest.cs (1)
341catch (FormatException)
GenerateDeploymentManifest.cs (2)
278catch (FormatException) 295catch (FormatException)
GenerateManifestBase.cs (2)
370catch (FormatException) 401catch (FormatException)
GenerateResource.cs (1)
3699catch (FormatException)
ManifestUtil\ApplicationManifest.cs (1)
290catch (FormatException)
ManifestUtil\ConvertUtil.cs (1)
27catch (FormatException)
ManifestUtil\DeployManifest.cs (4)
273catch (FormatException) 512catch (FormatException) { return 1; } 528catch (FormatException) { return UpdateMode.Foreground; } 544catch (FormatException) { return UpdateUnit.Days; }
ManifestUtil\Util.cs (1)
334catch (FormatException)
ResolveManifestFiles.cs (1)
1003catch (FormatException)
Touch.cs (1)
81catch (FormatException e)
Microsoft.Build.Utilities.Core (1)
ExceptionHandling.cs (1)
312|| e is FormatException
Microsoft.CodeAnalysis.CSharp (1)
Utilities\InterceptableLocation.cs (1)
128catch (FormatException)
Microsoft.CodeAnalysis.Features (1)
EmbeddedLanguages\DateAndTime\EmbeddedCompletionContext.cs (1)
105catch (FormatException)
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
EditAndContinue\RudeEditDiagnosticDescription.cs (1)
74catch (FormatException)
Microsoft.Data.Analysis.Tests (3)
DataFrame.IOTests.cs (1)
1752Assert.Throws<FormatException>(() => DataFrame.LoadCsvFromString(csvString));
DataFrameTests.cs (2)
1171Assert.Throws<FormatException>(() => df.Append(new List<object> { 5, "str" }, inPlace: true)); 1172Assert.Throws<FormatException>(() => df.Append(new Dictionary<string, object> { { "Column2", "str" } }, inPlace: true));
Microsoft.DotNet.Build.Tasks.Workloads (4)
WorkloadManifestPackage.wix.cs (2)
136/// <exception cref="FormatException" /> 145/// <exception cref="FormatException" />
WorkloadPackageBase.cs (1)
303/// <exception cref="FormatException" />
WorkloadSetPackage.wix.cs (1)
67/// <exception cref="FormatException" />
Microsoft.Extensions.AI.Abstractions (1)
AdditionalPropertiesDictionary{TValue}.cs (1)
180catch (Exception e) when (e is ArgumentException or FormatException or InvalidCastException or OverflowException)
Microsoft.Extensions.Compliance.Abstractions.Tests (7)
Classification\DataClassificationTypeConverterTests.cs (7)
125[InlineData("InvalidFormat", typeof(FormatException))] 126[InlineData("InvalidFormat:", typeof(FormatException))] 127[InlineData(":InvalidFormat", typeof(FormatException))] 128[InlineData(":", typeof(FormatException))] 129[InlineData("", typeof(FormatException))] 130[InlineData("\t", typeof(FormatException))] 131[InlineData("\n", typeof(FormatException))]
Microsoft.Extensions.Compliance.Testing (1)
FakeRedactorOptionsCustomValidator.cs (1)
22catch (FormatException ex)
Microsoft.Extensions.Configuration.Binder (1)
ConfigurationBinder.cs (1)
972catch (FormatException ex)
Microsoft.Extensions.Configuration.KeyPerFile.Tests (1)
ConfigurationProviderTestBase.cs (1)
125|| caught is FormatException);
Microsoft.Extensions.DependencyModel (1)
Utf8JsonReaderExtensions.cs (1)
135private static FormatException CreateUnexpectedException(ref Utf8JsonReader reader, string expected)
Microsoft.Maui.Controls (6)
BindingBase.cs (2)
154 catch (FormatException) 169 catch (FormatException)
BindingExpression.cs (1)
370 catch (FormatException)
BindingExpressionHelper.cs (1)
51 catch (Exception ex) when (ex is InvalidCastException || ex is FormatException || ex is InvalidOperationException || ex is OverflowException)
Shapes\PathFigureCollectionConverter.cs (1)
564 catch (FormatException)
Xaml\TypeConversionExtensions.cs (1)
212 catch (FormatException fe)
Microsoft.Maui.Controls.Build.Tasks (1)
NodeILExtensions.cs (1)
142 catch (FormatException fex)
Microsoft.ML.Core (1)
Utilities\Contracts.cs (1)
72catch (FormatException ex)
Microsoft.ML.CpuMath (1)
src\Microsoft.ML.Core\Utilities\Contracts.cs (1)
72catch (FormatException ex)
Microsoft.ML.Data (1)
EntryPoints\InputBuilder.cs (1)
516catch (FormatException ex)
Microsoft.ML.DataView (1)
Contracts.cs (1)
24catch (FormatException ex)
Microsoft.ML.FastTree (1)
FastTreeRanking.cs (1)
164if (ex is FormatException || ex is OverflowException)
Microsoft.ML.Tests (1)
TextLoaderTests.cs (1)
1411catch (FormatException)
Microsoft.ML.Transforms (1)
Text\TextFeaturizingEstimator.cs (1)
740catch (FormatException)
Microsoft.Net.Http.Headers (1)
ContentDispositionHeaderValue.cs (1)
608catch (FormatException)
Microsoft.Net.Http.Headers.Tests (37)
CacheControlHeaderValueTest.cs (3)
47Assert.Throws<FormatException>(() => cacheControl.NoCacheHeaders.Add("invalid PLACEHOLDER")); 54Assert.Throws<FormatException>(() => cacheControl.PrivateHeaders.Add("invalid PLACEHOLDER")); 575Assert.Throws<FormatException>(() => CacheControlHeaderValue.Parse(input));
ContentDispositionHeaderValueTest.cs (3)
636Assert.Throws<FormatException>(() => ContentDispositionHeaderValue.Parse(input)); 687Assert.Throws<FormatException>(() => ContentDispositionHeaderValue.Parse(input)); 704Assert.Throws<FormatException>(() => new ContentDispositionHeaderValue(contentDisposition));
ContentRangeHeaderValueTest.cs (4)
81Assert.Throws<FormatException>(() => range.Unit = " x"); 82Assert.Throws<FormatException>(() => range.Unit = "x "); 83Assert.Throws<FormatException>(() => range.Unit = "x y"); 172Assert.Throws<FormatException>(() => ContentRangeHeaderValue.Parse(input));
CookieHeaderValueTest.cs (2)
231Assert.Throws<FormatException>(() => CookieHeaderValue.Parse(value)); 305Assert.Throws<FormatException>(() => CookieHeaderValue.ParseStrictList(input));
EntityTagHeaderValueTest.cs (3)
442Assert.Throws<FormatException>(() => EntityTagHeaderValue.ParseStrictList(inputs)); 501Assert.Throws<FormatException>(() => EntityTagHeaderValue.Parse(input)); 518Assert.Throws<FormatException>(() => new EntityTagHeaderValue(tag));
HeaderUtilitiesTest.cs (2)
287Assert.Throws<FormatException>(() => { var actual = HeaderUtilities.EscapeAsQuotedString(input); }); 293Assert.Throws<FormatException>(() => { var actual = HeaderUtilities.EscapeAsQuotedString($"{(char)0x7F}"); });
MediaTypeHeaderValueTest.cs (3)
643Assert.Throws<FormatException>(() => MediaTypeHeaderValue.ParseStrictList(inputs)); 928Assert.Throws<FormatException>(() => MediaTypeHeaderValue.Parse(input)); 945Assert.Throws<FormatException>(() => new MediaTypeHeaderValue(mediaType));
NameValueHeaderValueTest.cs (6)
145Assert.Throws<FormatException>(() => { var x = new NameValueHeaderValue("name"); x.Value = " x "; }); 146Assert.Throws<FormatException>(() => { var x = new NameValueHeaderValue("name"); x.Value = "x y"; }); 512Assert.Throws<FormatException>(() => NameValueHeaderValue.ParseStrictList(inputs)); 615Assert.Throws<FormatException>(() => header.SetAndEscapeValue(input)); 658Assert.Throws<FormatException>(() => NameValueHeaderValue.Parse(input)); 681Assert.Throws<FormatException>(() => new NameValueHeaderValue(name, value));
RangeConditionHeaderValueTest.cs (1)
120Assert.Throws<FormatException>(() => RangeConditionHeaderValue.Parse(input));
RangeHeaderValueTest.cs (4)
23Assert.Throws<FormatException>(() => range.Unit = " x"); 24Assert.Throws<FormatException>(() => range.Unit = "x "); 25Assert.Throws<FormatException>(() => range.Unit = "x y"); 160Assert.Throws<FormatException>(() => RangeHeaderValue.Parse(input));
SetCookieHeaderValueTest.cs (2)
388Assert.Throws<FormatException>(() => SetCookieHeaderValue.Parse(value)); 474Assert.Throws<FormatException>(() => SetCookieHeaderValue.ParseStrictList(input));
StringWithQualityHeaderValueTest.cs (4)
17Assert.Throws<FormatException>(() => new StringWithQualityHeaderValue("in valid")); 29Assert.Throws<FormatException>(() => new StringWithQualityHeaderValue("in valid", 0.1)); 161Assert.Throws<FormatException>(() => StringWithQualityHeaderValue.Parse(input)); 404Assert.Throws<FormatException>(() => StringWithQualityHeaderValue.ParseStrictList(inputs));
Microsoft.VisualBasic.Core (27)
Microsoft\VisualBasic\CompilerServices\BooleanType.vb (1)
41Catch e As FormatException
Microsoft\VisualBasic\CompilerServices\ByteType.vb (1)
31Catch e As FormatException
Microsoft\VisualBasic\CompilerServices\Conversions.vb (15)
48Catch e As FormatException 192Catch e As FormatException 336Catch e As FormatException 483Catch e As FormatException 627Catch e As FormatException 771Catch e As FormatException 915Catch e As FormatException 1062Catch e As FormatException 1208Catch e As FormatException 1365Catch e2 As FormatException 1514Catch FormatEx As FormatException When Not (NumberFormat Is NormalizedNumberFormat) 1605Catch e As FormatException 1749Catch e As FormatException 1912Catch FormatEx As FormatException 1956Catch FormatEx As FormatException When Not (NumberFormat Is NormalizedNumberFormat)
Microsoft\VisualBasic\CompilerServices\DecimalType.vb (2)
45Catch e2 As FormatException 137Catch FormatEx As FormatException When Not (NumberFormat Is normalizedNumberFormat)
Microsoft\VisualBasic\CompilerServices\DoubleType.vb (3)
35Catch e As FormatException 169Catch FormatEx As FormatException 218Catch FormatEx As FormatException When Not (NumberFormat Is normalizedNumberFormat)
Microsoft\VisualBasic\CompilerServices\IntegerType.vb (1)
31Catch e As FormatException
Microsoft\VisualBasic\CompilerServices\LongType.vb (1)
34Catch e As FormatException
Microsoft\VisualBasic\CompilerServices\ShortType.vb (1)
31Catch e As FormatException
Microsoft\VisualBasic\CompilerServices\SingleType.vb (1)
41Catch e As FormatException
Microsoft\VisualBasic\CompilerServices\Versioned.vb (1)
85Catch ex As FormatException
MSBuild (5)
ExceptionHandling.cs (1)
312|| e is FormatException
XMake.cs (4)
3212catch (FormatException ex) 3326catch (FormatException ex) 3406catch (FormatException ex) 3506catch (FormatException ex)
MSBuildTaskHost (1)
ExceptionHandling.cs (1)
312|| e is FormatException
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
232[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.FormatException))]
netstandard (1)
netstandard.cs (1)
791[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.FormatException))]
PresentationBuildTasks (3)
Microsoft\Build\Tasks\Windows\UidManager.cs (1)
863catch (FormatException)
src\Microsoft.DotNet.Wpf\src\PresentationCore\System\Windows\Media\ParsersCommon.cs (1)
432catch (FormatException except)
src\Microsoft.DotNet.Wpf\src\PresentationFramework\System\Windows\Markup\ParserContext.cs (1)
435catch (System.FormatException) // If it's not a valid space value, ignore it
PresentationCore (4)
MS\Internal\FontFace\CompositeFontParser.cs (1)
196catch (FormatException x)
System\Windows\DurationConverter.cs (2)
71/// <exception cref="FormatException">Thrown when parsing of <paramref name="valueSpan"/> to <see cref="TimeSpan"/> instance fails.</exception> 78catch (FormatException e)
System\Windows\Media\ParsersCommon.cs (1)
432catch (FormatException except)
PresentationCore.Tests (5)
System\Windows\DurationConverter.Tests.cs (1)
121Assert.Throws<FormatException>(() => converter.ConvertFrom(null, culture, value));
System\Windows\Media\Animation\KeySplineConverter.Tests.cs (1)
121Assert.Throws<FormatException>(() => converter.ConvertFrom(null, CultureInfo.InvariantCulture, input));
System\Windows\Media\ColorConverter.Tests.cs (2)
396Assert.Throws<FormatException>(() => converter.ConvertFrom(color)); 438Assert.Throws<FormatException>(() => ColorConverter.ConvertFromString(color));
System\Windows\Media\Generated\BrushConverter.Tests.cs (1)
337Assert.Throws<FormatException>(() => converter.ConvertFrom(color));
PresentationFramework (18)
MS\Internal\Globalization\BamlTreeMap.cs (2)
669catch (FormatException) 693catch (FormatException)
System\Windows\Annotations\Storage\XmlStreamStore.cs (1)
573catch (FormatException fe)
System\Windows\Controls\ContentPresenter.cs (1)
1112catch (FormatException)
System\Windows\Controls\DatePicker.cs (1)
1135catch (FormatException ex)
System\Windows\Controls\DocumentViewer.cs (1)
1914catch (FormatException)
System\Windows\Controls\Primitives\DocumentViewerBase.cs (1)
1535catch (FormatException) { }
System\Windows\Data\MultiBindingExpression.cs (1)
1243catch (FormatException)
System\Windows\Documents\RtfToXamlReader.cs (4)
246catch (System.FormatException) 267catch (System.FormatException) 297catch (System.FormatException) 8575catch (System.FormatException)
System\Windows\Documents\XamlToRtfWriter.cs (2)
3657catch (System.FormatException) 3802catch (System.FormatException)
System\Windows\Documents\ZoomPercentageConverter.cs (1)
190catch (FormatException) { }
System\Windows\LengthConverter.cs (1)
223catch (FormatException)
System\Windows\Markup\ParserContext.cs (1)
435catch (System.FormatException) // If it's not a valid space value, ignore it
System\Windows\ThicknessConverter.cs (1)
185/// <exception cref="FormatException">Thrown when <paramref name="s"/> contains invalid string representation.</exception>
PresentationFramework.Tests (1)
System\Windows\Controls\VirtualizationCacheLengthConverter.Tests.cs (1)
191Assert.Throws<FormatException>(() => converter.ConvertFrom(null, culture, value));
PresentationUI (3)
MS\Internal\Documents\Application\ZoomComboBox.cs (1)
470catch (FormatException) { }
MS\Internal\Documents\DocumentApplicationDocumentViewer.cs (2)
1896catch (FormatException) { } 1987catch (FormatException) { }
ReachFramework (49)
packaging\XpsDigitalSignature.cs (1)
160catch( FormatException )
Packaging\XpsFixedPageReaderWriter.cs (1)
1909catch( FormatException )
Packaging\XPSSignatureDefinition.cs (1)
489catch (FormatException)
PrintConfig\DocumentNUp.cs (1)
184catch (FormatException)
PrintConfig\PageCanvasSize.cs (6)
201catch (FormatException) 219catch (FormatException) 250catch (FormatException) 268catch (FormatException) 286catch (FormatException) 304catch (FormatException)
PrintConfig\PageMediaSize.cs (1)
226catch (FormatException)
PrintConfig\PageResolution.cs (2)
205catch (FormatException) 223catch (FormatException)
PrintConfig\PageScaling.cs (1)
335catch (FormatException)
PrintConfig\PrintSchema.cs (5)
2354catch (FormatException) 2421/// <exception cref="FormatException">thrown if the string is invalid to be converted</exception> 2432catch (FormatException e) 2456/// <exception cref="FormatException">thrown if the string is invalid to be converted</exception> 2467catch (FormatException e)
PrintConfig\PrtCap_Base.cs (3)
312catch (FormatException) 330catch (FormatException) 348catch (FormatException)
PrintConfig\PrtCap_Builder.cs (1)
32/// <exception cref="FormatException">thrown by XmlPrintCapReader if XML Print Capabilities is not well-formed</exception>
PrintConfig\PrtCap_Public.cs (4)
37/// <exception cref="FormatException"> 444internal static FormatException NewPrintCapFormatException(string detailMsg) 455internal static FormatException NewPrintCapFormatException(string detailMsg, Exception innerException) 487/// <exception cref="FormatException">thrown if XML PrintCapabilities is not well-formed</exception>
PrintConfig\PrtCap_Public_Simple.cs (1)
191/// <exception cref="FormatException">
PrintConfig\PrtCap_Reader.cs (9)
32/// <exception cref="FormatException">thrown if XML PrintCapabilities is not well-formed</exception> 82catch (FormatException e) 283/// <exception cref="FormatException">can't find the value</exception> 303/// <exception cref="FormatException">either can't find the value or find invalid value number</exception> 316catch (FormatException e) 333/// <exception cref="FormatException">either can't find the value or value is private</exception> 358/// <exception cref="FormatException">either can't find the child-element or its name is private</exception> 481private static FormatException NewPrintCapFormatException(string detailMsg) 492private static FormatException NewPrintCapFormatException(string detailMsg, Exception innerException)
PrintConfig\PrtTicket_Base.cs (2)
529catch (FormatException) 1253catch (FormatException)
PrintConfig\PrtTicket_Editor.cs (6)
33/// <exception cref="FormatException"> 69catch (FormatException e) 140/// <exception cref="FormatException"> 197/// <exception cref="FormatException"> 389private static FormatException NewPTFormatException(string detailMsg) 400private static FormatException NewPTFormatException(string detailMsg, Exception innerException)
PrintConfig\PrtTicket_Public.cs (3)
56/// <exception cref="FormatException"> 510internal static FormatException NewPTFormatException(string detailMsg) 521internal static FormatException NewPTFormatException(string detailMsg, Exception innerException)
PrintConfig\PrtTicket_Public_Simple.cs (1)
260/// <exception cref="FormatException">
System.ComponentModel.Annotations (2)
System\ComponentModel\DataAnnotations\CustomValidationAttribute.cs (1)
334catch (FormatException)
System\ComponentModel\DataAnnotations\RangeAttribute.cs (1)
148catch (FormatException)
System.ComponentModel.TypeConverter (7)
System\ComponentModel\BooleanConverter.cs (1)
37catch (FormatException e)
System\ComponentModel\DateOnlyConverter.cs (1)
64catch (FormatException e)
System\ComponentModel\DateTimeConverter.cs (1)
68catch (FormatException e)
System\ComponentModel\DateTimeOffsetConverter.cs (1)
68catch (FormatException e)
System\ComponentModel\TimeOnlyConverter.cs (1)
64catch (FormatException e)
System\ComponentModel\TimeSpanConverter.cs (1)
49catch (FormatException e)
System\ComponentModel\VersionConverter.cs (1)
39/// <exception cref="FormatException"><paramref name="value"/> is not a valid version string</exception>
System.Data.Common (14)
System\Data\DataColumn.cs (1)
539catch (FormatException ex)
System\Data\Filter\BinaryNode.cs (1)
262catch (System.FormatException e)
System\Data\Filter\ConstNode.cs (5)
150catch (System.FormatException e) 170catch (System.FormatException e) 228catch (System.FormatException e) 249catch (System.FormatException e) 270catch (System.FormatException e)
System\Data\SQLTypes\SQLDateTime.cs (1)
352catch (FormatException)
System\Data\XDRSchema.cs (1)
488catch (System.FormatException)
System\Data\XMLSchema.cs (5)
2086catch (System.FormatException) 2188catch (System.FormatException) 2335catch (System.FormatException) 2352catch (System.FormatException) 2554catch (System.FormatException)
System.Data.Odbc (3)
Common\System\Data\Common\AdapterUtil.Odbc.cs (1)
400else if (inner is FormatException)
Common\System\Data\Common\DbConnectionOptions.cs (1)
239catch (FormatException e)
System\Data\Odbc\OdbcConnection.cs (1)
233catch (System.FormatException e)
System.Drawing.Common.Tests (8)
System\Drawing\ColorTranslatorTests.cs (2)
217[InlineData("#G12", typeof(FormatException))] 218[InlineData("#G12345", typeof(FormatException))]
System\Drawing\ImageFormatConverterTests.cs (6)
118Assert.Throws<FormatException>(() => _imgFmtConv.ConvertFrom("System.Drawing.String")); 119Assert.Throws<FormatException>(() => _imgFmtConv.ConvertFrom(null, CultureInfo.InvariantCulture, "System.Drawing.String")); 120Assert.Throws<FormatException>(() => _imgFmtConv.ConvertFrom("[ImageFormat: abcdefgh-ijkl-mnop-qrst-uvwxyz012345]")); 122Assert.Throws<FormatException>(() => _imgFmtConvFrmTD.ConvertFrom("System.Drawing.String")); 123Assert.Throws<FormatException>(() => _imgFmtConvFrmTD.ConvertFrom(null, CultureInfo.InvariantCulture, "System.Drawing.String")); 124Assert.Throws<FormatException>(() => _imgFmtConvFrmTD.ConvertFrom("[ImageFormat: abcdefgh-ijkl-mnop-qrst-uvwxyz012345]"));
System.Formats.Nrbf (1)
System\Formats\Nrbf\NrbfDecoder.cs (1)
137catch (FormatException) // can be thrown by various BinaryReader methods
System.IO.Packaging (1)
System\IO\Packaging\PartBasedPackageProperties.cs (1)
668catch (FormatException exc)
System.Net.Http (4)
System\Net\Http\Headers\ByteArrayHeaderParser.cs (1)
50catch (FormatException e)
System\Net\Http\Headers\ContentDispositionHeaderValue.cs (1)
482catch (FormatException)
System\Net\Http\Headers\MediaTypeHeaderValue.cs (1)
151/// <exception cref="FormatException"><parmref name="input"/> is not valid media type header value information.</exception>
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (1)
1117catch (FormatException formatEx)
System.Net.Mail (4)
System\Net\Mail\Attachment.cs (1)
145catch (FormatException)
System\Net\Mail\MailPriority.cs (1)
153catch (FormatException) { }
System\Net\Mime\ContentDisposition.cs (1)
325catch (FormatException exception)
System\Net\Mime\ContentType.cs (1)
282catch (FormatException fe) when (fe.Message != SR.ContentTypeInvalid)
System.Net.Primitives (3)
System\Net\IPNetwork.cs (3)
134/// <exception cref="FormatException"><paramref name="s"/> is not a valid CIDR network string, or the address contains non-zero bits after the network prefix.</exception> 146/// <exception cref="FormatException"><paramref name="s"/> is not a valid CIDR network string, or the address contains non-zero bits after the network prefix.</exception> 162/// <exception cref="FormatException"><paramref name="utf8Text"/> is not a valid UTF-8 CIDR network string, or the address contains non-zero bits after the network prefix.</exception>
System.Private.CoreLib (53)
src\libraries\System.Private.CoreLib\src\System\AppContextConfigHelper.cs (4)
84catch (FormatException) 123catch (FormatException) 194catch (FormatException) 233catch (FormatException)
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlDecoder.cs (7)
75/// <exception cref="FormatException"><paramref name="buffer"/> contains an invalid Base64Url character, 106/// <exception cref="FormatException"><paramref name="source"/> contains an invalid Base64Url character, 140/// <exception cref="FormatException"><paramref name="source"/> contains an invalid Base64Url character, 160/// <exception cref="FormatException"><paramref name="source"/> contains an invalid Base64Url character, 330/// <exception cref="FormatException"><paramref name="source"/> contains a invalid Base64Url character, 357/// <exception cref="FormatException"><paramref name="source"/> contains an invalid Base64Url character, 376/// <exception cref="FormatException"><paramref name="source"/> contains a invalid Base64Url character,
src\libraries\System.Private.CoreLib\src\System\Convert.cs (4)
2924/// <exception cref="FormatException">The length of <paramref name="s"/>, is not zero or a multiple of 2.</exception> 2925/// <exception cref="FormatException">The format of <paramref name="s"/> is invalid. <paramref name="s"/> contains a non-hex character.</exception> 2941/// <exception cref="FormatException">The length of <paramref name="chars"/>, is not zero or a multiple of 2.</exception> 2942/// <exception cref="FormatException">The format of <paramref name="chars"/> is invalid. <paramref name="chars"/> contains a non-hex character.</exception>
src\libraries\System.Private.CoreLib\src\System\Enum.cs (5)
1008catch (FormatException) 1392/// <exception cref="FormatException"><paramref name="format"/> contains an invalid specification.</exception> 1622/// <exception cref="FormatException"><paramref name="format"/> contains an invalid value.</exception> 1746/// <exception cref="FormatException">The format parameter contains an invalid value.</exception> 2153private static FormatException CreateInvalidFormatSpecifierException() =>
src\libraries\System.Private.CoreLib\src\System\IParsable.cs (1)
18/// <exception cref="FormatException"><paramref name="s" /> is not in the correct format.</exception>
src\libraries\System.Private.CoreLib\src\System\ISpanParsable.cs (1)
17/// <exception cref="FormatException"><paramref name="s" /> is not in the correct format.</exception>
src\libraries\System.Private.CoreLib\src\System\IUtf8SpanParsable.cs (1)
17/// <exception cref="FormatException"><paramref name="utf8Text" /> is not in the correct format.</exception>
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (5)
5669/// <exception cref="FormatException">The index of a format item is greater than or equal to the number of supplied arguments.</exception> 5691/// <exception cref="FormatException">The index of a format item is greater than or equal to the number of supplied arguments.</exception> 5715/// <exception cref="FormatException">The index of a format item is greater than or equal to the number of supplied arguments.</exception> 5735/// <exception cref="FormatException">The index of a format item is greater than or equal to the number of supplied arguments.</exception> 5754/// <exception cref="FormatException">The index of a format item is greater than or equal to the number of supplied arguments.</exception>
src\libraries\System.Private.CoreLib\src\System\Numerics\INumberBase.cs (3)
282/// <exception cref="FormatException"><paramref name="s" /> is not in the correct format.</exception> 292/// <exception cref="FormatException"><paramref name="s" /> is not in the correct format.</exception> 302/// <exception cref="FormatException"><paramref name="utf8Text" /> is not in the correct format.</exception>
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (7)
620/// <exception cref="FormatException"><paramref name="s" /> does not represent a number in a valid format.</exception> 637/// <exception cref="FormatException"><paramref name="s" /> does not represent a number in a valid format.</exception> 649/// <exception cref="FormatException"><paramref name="s" /> does not represent a number in a valid format.</exception> 667/// <exception cref="FormatException"><paramref name="s" /> does not represent a number in a valid format.</exception> 684/// <exception cref="FormatException"><paramref name="s" /> does not represent a number in a valid format.</exception> 839/// <exception cref="FormatException"><paramref name="format" /> is invalid.</exception> 851/// <exception cref="FormatException"><paramref name="format" /> is invalid.</exception>
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (5)
557/// <exception cref="FormatException">The index of a format item is greater than or equal to the number of supplied arguments.</exception> 577/// <exception cref="FormatException">The index of a format item is greater than or equal to the number of supplied arguments.</exception> 599/// <exception cref="FormatException">The index of a format item is greater than or equal to the number of supplied arguments.</exception> 617/// <exception cref="FormatException">The index of a format item is greater than or equal to the number of supplied arguments.</exception> 634/// <exception cref="FormatException">The index of a format item is greater than or equal to the number of supplied arguments.</exception>
src\libraries\System.Private.CoreLib\src\System\Text\CompositeFormat.cs (2)
72/// <exception cref="FormatException">A format item in <paramref name="format"/> is invalid.</exception> 97/// <exception cref="FormatException">An insufficient number of arguments were provided.</exception>
src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (7)
1465/// <exception cref="FormatException"> 1514/// <exception cref="FormatException"> 1801/// <exception cref="FormatException">The index of a format item is greater than or equal to the number of supplied arguments.</exception> 1821/// <exception cref="FormatException">The index of a format item is greater than or equal to the number of supplied arguments.</exception> 1843/// <exception cref="FormatException">The index of a format item is greater than or equal to the number of supplied arguments.</exception> 1861/// <exception cref="FormatException">The index of a format item is greater than or equal to the number of supplied arguments.</exception> 1878/// <exception cref="FormatException">The index of a format item is greater than or equal to the number of supplied arguments.</exception>
src\libraries\System.Private.CoreLib\src\System\Version.cs (1)
312/// <exception cref="FormatException">At least one component in <paramref name="utf8Text" /> is not an integer.</exception>
System.Private.DataContractSerialization (47)
System\Runtime\Serialization\Json\JsonReaderDelegator.cs (3)
176catch (Exception exception) when (exception is ArgumentException or FormatException or OverflowException) 277catch (FormatException exception) 310catch (FormatException exception)
System\Runtime\Serialization\Json\XmlJsonReader.cs (3)
691catch (Exception exception) when (exception is ArgumentException or FormatException or OverflowException) 709catch (Exception exception) when (exception is ArgumentException or FormatException or OverflowException) 948catch (Exception exception) when (exception is ArgumentException or FormatException or OverflowException)
System\Runtime\Serialization\SchemaImporter.cs (2)
813catch (FormatException fe) 1160catch (FormatException fe)
System\Runtime\Serialization\XmlObjectSerializer.cs (6)
106catch (FormatException ex) 174catch (FormatException ex) 196catch (FormatException ex) 216catch (FormatException ex) 362catch (FormatException ex) 382catch (FormatException ex)
System\Runtime\Serialization\XmlReaderDelegator.cs (5)
490catch (FormatException exception) 691catch (FormatException exception) 712catch (FormatException exception) 736catch (FormatException exception) 753catch (FormatException exception)
System\Xml\ValueHandle.cs (4)
452catch (FormatException) 461catch (FormatException exception) 679catch (FormatException) 785catch (FormatException exception)
System\Xml\XmlBaseReader.cs (1)
1505catch (FormatException exception)
System\Xml\XmlBufferReader.cs (2)
433catch (FormatException exception) 455catch (FormatException exception)
System\Xml\XmlConverter.cs (11)
47catch (FormatException exception) 76catch (FormatException exception) 104catch (FormatException exception) 132catch (FormatException exception) 160catch (FormatException exception) 188catch (FormatException exception) 225catch (FormatException exception) 249catch (FormatException exception) 270catch (FormatException exception) 291catch (FormatException exception) 320catch (FormatException exception)
System\Xml\XmlDictionaryReader.cs (10)
840catch (FormatException exception) 871catch (FormatException exception) 902catch (FormatException exception) 1665catch (FormatException exception) 1686catch (FormatException exception) 1706catch (FormatException exception) 1726catch (FormatException exception) 1746catch (FormatException exception) 1766catch (FormatException exception) 1786catch (FormatException exception)
System.Private.Xml (68)
System\Xml\BinaryXml\XmlBinaryReader.cs (9)
1132catch (FormatException e) 1222catch (FormatException e) 1317catch (FormatException e) 1412catch (FormatException e) 1507catch (FormatException e) 1602catch (FormatException e) 1697catch (FormatException e) 1737catch (FormatException e) 1784catch (FormatException e)
System\Xml\Core\XmlReader.cs (9)
165catch (FormatException e) 184catch (FormatException e) 203catch (FormatException e) 222catch (FormatException e) 241catch (FormatException e) 260catch (FormatException e) 279catch (FormatException e) 298catch (FormatException e) 335catch (FormatException e)
System\Xml\Core\XmlReaderAsync.cs (1)
63catch (FormatException e)
System\Xml\Core\XsdValidatingReader.cs (18)
480catch (FormatException e) 514catch (FormatException e) 548catch (FormatException e) 582catch (FormatException e) 616catch (FormatException e) 650catch (FormatException e) 685catch (FormatException e) 720catch (FormatException e) 758catch (FormatException e) 804catch (FormatException e) 839catch (FormatException e) 874catch (FormatException e) 909catch (FormatException e) 944catch (FormatException e) 979catch (FormatException e) 1014catch (FormatException e) 1053catch (FormatException e) 1092catch (FormatException e)
System\Xml\Core\XsdValidatingReaderAsync.cs (4)
65catch (FormatException e) 108catch (FormatException e) 164catch (FormatException e) 208catch (FormatException e)
System\Xml\Schema\DataTypeImplementation.cs (4)
601catch (FormatException e) 1069catch (FormatException e) 1324catch (FormatException e) 2529catch (FormatException e)
System\Xml\Schema\Inference\Infer.cs (14)
1468catch (FormatException) 1482catch (FormatException) 1499catch (FormatException) 1513catch (FormatException) 1530catch (FormatException) 1544catch (FormatException) 1561catch (FormatException) 1575catch (FormatException) 1609catch (FormatException) 1618catch (FormatException) 1636catch (FormatException) { } 1651catch (FormatException) 1665catch (FormatException) 2367catch (FormatException)
System\Xml\Schema\Preprocessor.cs (4)
511catch (FormatException eInner) 1991catch (FormatException fe) 2035catch (FormatException fe) 2112catch (FormatException fx)
System\Xml\Schema\SchemaCollectionpreProcessor.cs (1)
419catch (FormatException)
System\Xml\XmlConvert.cs (2)
1076catch (FormatException) 1280catch (FormatException)
System\Xml\Xsl\IlGen\XmlILOptimizerVisitor.cs (1)
5418catch (FormatException) { }
System\Xml\Xsl\XsltOld\NumberAction.cs (1)
505catch (System.FormatException) { }
System.Private.Xml.Linq (24)
System\Xml\Linq\XElement.cs (24)
1356/// <exception cref="System.FormatException"> 1379/// <exception cref="System.FormatException"> 1399/// <exception cref="System.FormatException"> 1422/// <exception cref="System.FormatException"> 1442/// <exception cref="System.FormatException"> 1465/// <exception cref="System.FormatException"> 1485/// <exception cref="System.FormatException"> 1508/// <exception cref="System.FormatException"> 1528/// <exception cref="System.FormatException"> 1551/// <exception cref="System.FormatException"> 1571/// <exception cref="System.FormatException"> 1594/// <exception cref="System.FormatException"> 1614/// <exception cref="System.FormatException"> 1637/// <exception cref="System.FormatException"> 1657/// <exception cref="System.FormatException"> 1680/// <exception cref="System.FormatException"> 1700/// <exception cref="System.FormatException"> 1723/// <exception cref="System.FormatException"> 1743/// <exception cref="System.FormatException"> 1766/// <exception cref="System.FormatException"> 1786/// <exception cref="System.FormatException"> 1809/// <exception cref="System.FormatException"> 1829/// <exception cref="System.FormatException"> 1852/// <exception cref="System.FormatException">
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
189[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.FormatException))]
System.ServiceModel.Syndication (6)
System\ServiceModel\Syndication\Atom10FeedFormatter.cs (2)
785catch (FormatException e) 866catch (FormatException e)
System\ServiceModel\Syndication\AtomPub10CategoriesDocumentFormatter.cs (1)
146catch (FormatException e)
System\ServiceModel\Syndication\AtomPub10ServiceDocumentFormatter.cs (1)
474catch (FormatException e)
System\ServiceModel\Syndication\Rss20FeedFormatter.cs (2)
462catch (FormatException e) 767catch (FormatException e)
System.Text.Json (32)
System\Text\Json\Document\JsonElement.cs (15)
417/// <exception cref="FormatException"> 466/// <exception cref="FormatException"> 517/// <exception cref="FormatException"> 564/// <exception cref="FormatException"> 615/// <exception cref="FormatException"> 663/// <exception cref="FormatException"> 714/// <exception cref="FormatException"> 765/// <exception cref="FormatException"> 816/// <exception cref="FormatException"> 884/// <exception cref="FormatException"> 951/// <exception cref="FormatException"> 1002/// <exception cref="FormatException"> 1053/// <exception cref="FormatException"> 1104/// <exception cref="FormatException"> 1155/// <exception cref="FormatException">
System\Text\Json\Nodes\JsonNode.cs (1)
190/// <exception cref="FormatException">
System\Text\Json\Reader\Utf8JsonReader.TryGet.cs (15)
282/// <exception cref="FormatException"> 305/// <exception cref="FormatException"> 339/// <exception cref="FormatException"> 374/// <exception cref="FormatException"> 408/// <exception cref="FormatException"> 442/// <exception cref="FormatException"> 476/// <exception cref="FormatException"> 511/// <exception cref="FormatException"> 546/// <exception cref="FormatException"> 581/// <exception cref="FormatException"> 638/// <exception cref="FormatException"> 695/// <exception cref="FormatException"> 728/// <exception cref="FormatException"> 761/// <exception cref="FormatException"> 794/// <exception cref="FormatException">
System\Text\Json\Serialization\JsonConverterOfT.ReadCore.cs (1)
66case FormatException when ex.Source == ThrowHelper.ExceptionSourceValueToRethrowAsJsonException:
System.Transactions.Local (1)
System\Transactions\TransactionManager.cs (1)
193catch (FormatException e)
System.Windows.Forms (3)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (1)
2310catch (FormatException ex)
System\Windows\Forms\Controls\ToolStrips\OpacityConverter.cs (1)
65catch (FormatException e)
System\Windows\Forms\DataBinding\BindingNavigator.cs (1)
613catch (FormatException)
System.Windows.Forms.Design (3)
System\Windows\Forms\Design\FormatControl.CustomFormatType.cs (3)
49catch (FormatException) 63catch (FormatException) 77catch (FormatException)
System.Windows.Forms.Tests (8)
System\Windows\Forms\AxHostTests.cs (1)
227Assert.Throws<FormatException>(() => new SubAxHost(clsid));
System\Windows\Forms\CursorConverterTests.cs (2)
87Assert.Throws<FormatException>(() => converter.ConvertTo(new Cursor(2), typeof(string))); 149Assert.Throws<FormatException>(() => converter.ConvertTo(Cursors.AppStarting, typeof(byte[])));
System\Windows\Forms\DataGridViewCellTests.cs (4)
6171Assert.Throws<FormatException>(() => cell.ParseFormattedValue(1, new DataGridViewCellStyle(), new Int32Converter(), new Int32Converter())); 6178Assert.Throws<FormatException>(() => cell.ParseFormattedValue(1, new DataGridViewCellStyle(), new Int32Converter(), new Int32Converter())); 6185Assert.Throws<FormatException>(() => cell.ParseFormattedValue(1, new DataGridViewCellStyle(), new Int32Converter(), new Int32Converter())); 6204Assert.Throws<FormatException>(() => cell.ParseFormattedValue(formattedValue, cellStyle, formattedValueTypeConverter, valueTypeConverter));
System\Windows\Forms\OpacityConverterTests.cs (1)
69Assert.Throws<FormatException>(() => converter.ConvertFrom(value));
System.Xaml.Tests (4)
System\Xaml\Schema\XamlTypeNameTests.cs (3)
294Assert.Throws<FormatException>(() => XamlTypeName.Parse("name", namespaceResolver)); 382Assert.Throws<FormatException>(() => XamlTypeName.Parse(typeName, namespaceResolver)); 432Assert.Throws<FormatException>(() => XamlTypeName.ParseList(typeNameList, namespaceResolver));
System\Xaml\Schema\XamlTypeTypeConverterTests.cs (1)
115Assert.Throws<FormatException>(() => converter.ConvertFrom(context, null, value));
UIAutomationClientSideProviders (2)
MS\Internal\AutomationProxies\WinFormsSpinner.cs (2)
57catch (FormatException) 67catch (FormatException)
WindowsBase.Tests (38)
System\IO\Packaging\PackageDigitalSignatureManagerTests.cs (1)
211Assert.Throws<FormatException>(() => manager.TimeFormat = value);
System\Security\RightsManagement\PublishLicenseTests.cs (1)
240Assert.Throws<FormatException>(() => new PublishLicense(PublishLicenseTemplate));
System\Windows\Converters\Int32RectValueSerializerTests.cs (2)
104Assert.Throws<FormatException>(() => serializer.ConvertFromString(value, null)); 105Assert.Throws<FormatException>(() => serializer.ConvertFromString(value, new CustomValueSerializerContext()));
System\Windows\Converters\PointValueSerializerTests.cs (2)
104Assert.Throws<FormatException>(() => serializer.ConvertFromString(value, null)); 105Assert.Throws<FormatException>(() => serializer.ConvertFromString(value, new CustomValueSerializerContext()));
System\Windows\Converters\RectValueSerializerTests.cs (2)
104Assert.Throws<FormatException>(() => serializer.ConvertFromString(value, null)); 105Assert.Throws<FormatException>(() => serializer.ConvertFromString(value, new CustomValueSerializerContext()));
System\Windows\Converters\SizeValueSerializerTests.cs (2)
104Assert.Throws<FormatException>(() => serializer.ConvertFromString(value, null)); 105Assert.Throws<FormatException>(() => serializer.ConvertFromString(value, new CustomValueSerializerContext()));
System\Windows\Converters\VectorValueSerializerTests.cs (2)
104Assert.Throws<FormatException>(() => serializer.ConvertFromString(value, null)); 105Assert.Throws<FormatException>(() => serializer.ConvertFromString(value, new CustomValueSerializerContext()));
System\Windows\Int32RectConverterTests.cs (3)
152Assert.Throws<FormatException>(() => converter.ConvertFrom(value)); 153Assert.Throws<FormatException>(() => converter.ConvertFrom(null, null, value)); 154Assert.Throws<FormatException>(() => converter.ConvertFrom(new CustomTypeDescriptorContext(), CultureInfo.InvariantCulture, value));
System\Windows\Int32RectTests.cs (1)
356Assert.Throws<FormatException>(() => Int32Rect.Parse(source));
System\Windows\Media\Converters\MatrixValueSerializerTests.cs (2)
104Assert.Throws<FormatException>(() => serializer.ConvertFromString(value, null)); 105Assert.Throws<FormatException>(() => serializer.ConvertFromString(value, new CustomValueSerializerContext()));
System\Windows\Media\MatrixConverterTests.cs (3)
152Assert.Throws<FormatException>(() => converter.ConvertFrom(value)); 153Assert.Throws<FormatException>(() => converter.ConvertFrom(null, null, value)); 154Assert.Throws<FormatException>(() => converter.ConvertFrom(new CustomTypeDescriptorContext(), CultureInfo.InvariantCulture, value));
System\Windows\Media\MatrixTests.cs (1)
1310Assert.Throws<FormatException>(() => Matrix.Parse(source));
System\Windows\PointConverterTests.cs (3)
152Assert.Throws<FormatException>(() => converter.ConvertFrom(value)); 153Assert.Throws<FormatException>(() => converter.ConvertFrom(null, null, value)); 154Assert.Throws<FormatException>(() => converter.ConvertFrom(new CustomTypeDescriptorContext(), CultureInfo.InvariantCulture, value));
System\Windows\PointTests.cs (1)
423Assert.Throws<FormatException>(() => Point.Parse(source));
System\Windows\RectConverterTests.cs (3)
152Assert.Throws<FormatException>(() => converter.ConvertFrom(value)); 153Assert.Throws<FormatException>(() => converter.ConvertFrom(null, null, value)); 154Assert.Throws<FormatException>(() => converter.ConvertFrom(new CustomTypeDescriptorContext(), CultureInfo.InvariantCulture, value));
System\Windows\RectTests.cs (1)
2830Assert.Throws<FormatException>(() => Rect.Parse(source));
System\Windows\SizeConverterTests.cs (3)
152Assert.Throws<FormatException>(() => converter.ConvertFrom(value)); 153Assert.Throws<FormatException>(() => converter.ConvertFrom(null, null, value)); 154Assert.Throws<FormatException>(() => converter.ConvertFrom(new CustomTypeDescriptorContext(), CultureInfo.InvariantCulture, value));
System\Windows\SizeTests.cs (1)
378Assert.Throws<FormatException>(() => Size.Parse(source));
System\Windows\VectorConverterTests.cs (3)
152Assert.Throws<FormatException>(() => converter.ConvertFrom(value)); 153Assert.Throws<FormatException>(() => converter.ConvertFrom(null, null, value)); 154Assert.Throws<FormatException>(() => converter.ConvertFrom(new CustomTypeDescriptorContext(), CultureInfo.InvariantCulture, value));
System\Windows\VectorTests.cs (1)
695Assert.Throws<FormatException>(() => Vector.Parse(source));
xunit.console (2)
common\Json.cs (2)
335catch (FormatException ex) 686catch (FormatException ex)