29 instantiations of UriFormatException
Infrastructure.Common (1)
ServiceUtilHelper.cs (1)
522throw new UriFormatException($"UriBuilder didn't like parsing {builder.ToString()}", ufe);
Microsoft.AspNetCore.Components.Tests (2)
RendererTest.cs (2)
3744var exception2 = new UriFormatException(); 3803var exception2 = new UriFormatException();
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Extensions\ProtocolConversions.cs (1)
210throw new UriFormatException($"Failed create URI from '{uriString}'; original string: '{absolutePath}'", e);
Microsoft.Extensions.AI.Abstractions (5)
Contents\DataContent.cs (1)
91throw new UriFormatException("The URI is not well-formed.");
Contents\DataUriParser.cs (4)
27throw new UriFormatException("Invalid data URI format: the data URI must start with 'data:'."); 36throw new UriFormatException("Invalid data URI format: the data URI must contain a comma separating the metadata and the data."); 53throw new UriFormatException("Invalid data URI format: the data URI is base64-encoded, but the data is not a valid base64 string."); 61throw new UriFormatException("Invalid data URI format: the media type is not a valid.");
PresentationCore (3)
System\Windows\Navigation\BaseUriHelper.cs (3)
275throw new UriFormatException(SR.WrongFirstSegment); 296throw new UriFormatException(SR.WrongFirstSegment); 307throw new UriFormatException(SR.WrongFirstSegment);
System.Private.Uri (17)
System\DomainNameHelper.cs (2)
208throw new UriFormatException(SR.net_uri_BadUnicodeHostForIdn); 214throw new UriFormatException(SR.net_uri_BadUnicodeHostForIdn);
System\Uri.cs (14)
657return new UriFormatException(SR.net_uri_BadFormat); 659return new UriFormatException(SR.net_uri_BadScheme); 661return new UriFormatException(SR.net_uri_BadAuthority); 663return new UriFormatException(SR.net_uri_EmptyUri); 666return new UriFormatException(SR.net_uri_SchemeLimit); 668return new UriFormatException(SR.net_uri_SizeLimit); 670return new UriFormatException(SR.net_uri_MustRootedPath); 673return new UriFormatException(SR.net_uri_BadHostName); 675return new UriFormatException(SR.net_uri_BadFormat); 677return new UriFormatException(SR.net_uri_BadPort); 679return new UriFormatException(SR.net_uri_BadAuthorityTerminator); 681return new UriFormatException(SR.net_uri_CannotCreateRelative); 685return new UriFormatException(SR.net_uri_BadFormat); 2636throw new UriFormatException(SR.Format(SR.net_uri_PortOutOfRange, _syntax.GetType(), portStr));
System\UriBuilder.cs (1)
310throw new UriFormatException(SR.net_uri_BadUserPassword);
87 references to UriFormatException
Aspire.Hosting (1)
ApplicationModel\ExpressionResolver.cs (1)
120catch (UriFormatException)
dotnet-svcutil-lib (1)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\FramingDecoders.cs (1)
228catch (UriFormatException exception)
Infrastructure.Common (1)
ServiceUtilHelper.cs (1)
520catch (UriFormatException ufe)
Microsoft.AspNetCore.Components.Tests (2)
RendererTest.cs (2)
3744var exception2 = new UriFormatException(); 3803var exception2 = new UriFormatException();
Microsoft.Build (1)
ExceptionHandling.cs (1)
182|| e is UriFormatException; // XmlTextReader for example uses this under the covers
Microsoft.Build.Engine.OM.UnitTests (1)
ExceptionHandling.cs (1)
182|| e is UriFormatException; // XmlTextReader for example uses this under the covers
Microsoft.Build.Tasks.Core (3)
BootstrapperUtil\Util.cs (1)
52catch (UriFormatException)
ExceptionHandling.cs (1)
182|| e is UriFormatException; // XmlTextReader for example uses this under the covers
SignFile.cs (1)
92catch (UriFormatException ex)
Microsoft.Build.Utilities.Core (1)
ExceptionHandling.cs (1)
182|| e is UriFormatException; // XmlTextReader for example uses this under the covers
Microsoft.CodeAnalysis.LanguageServer.Protocol (4)
Extensions\ProtocolConversions.cs (3)
192/// <exception cref="UriFormatException"> 206catch (UriFormatException e) 473catch (UriFormatException)
Handler\References\FindUsagesLSPContext.cs (1)
282catch (UriFormatException e) when (FatalError.ReportAndCatch(e))
Microsoft.Extensions.AI.Abstractions.Tests (17)
Contents\DataContentTests.cs (17)
16[InlineData("invalid", typeof(UriFormatException))] 19[InlineData("data", typeof(UriFormatException))] // data missing colon 20[InlineData("data:", typeof(UriFormatException))] // data missing comma 21[InlineData("data:something,", typeof(UriFormatException))] // mime type without subtype 22[InlineData("data:something;else,data", typeof(UriFormatException))] // mime type without subtype 23[InlineData("data:type/subtype;;parameter=value;else,", typeof(UriFormatException))] // parameter without value 24[InlineData("data:type/subtype;parameter=va=lue;else,", typeof(UriFormatException))] // parameter with multiple = 25[InlineData("data:type/subtype;=value;else,", typeof(UriFormatException))] // empty parameter name 26[InlineData("data:image/j/peg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD", typeof(UriFormatException))] // multiple slashes in media type 29[InlineData("data:text;base64,something!", typeof(UriFormatException))] // Invalid base64 due to invalid character '!' 30[InlineData("data:text/plain;base64,U29tZQ==\t", typeof(UriFormatException))] // Invalid base64 due to tab character 31[InlineData("data:text/plain;base64,U29tZQ==\r", typeof(UriFormatException))] // Invalid base64 due to carriage return character 32[InlineData("data:text/plain;base64,U29tZQ==\n", typeof(UriFormatException))] // Invalid base64 due to line feed character 33[InlineData("data:text/plain;base64,U29t\r\nZQ==", typeof(UriFormatException))] // Invalid base64 due to carriage return and line feed characters 34[InlineData("data:text/plain;base64,U29", typeof(UriFormatException))] // Invalid base64 due to missing padding 35[InlineData("data:text/plain;base64,U29tZQ", typeof(UriFormatException))] // Invalid base64 due to missing padding 36[InlineData("data:text/plain;base64,U29tZQ=", typeof(UriFormatException))] // Invalid base64 due to missing padding
Microsoft.Maui (2)
Handlers\WebView\WebViewHandler.iOS.cs (1)
160 catch (UriFormatException)
Platform\iOS\MauiWKWebView.cs (1)
127 catch (UriFormatException formatException)
Microsoft.Maui.Controls.Compatibility (1)
iOS\Renderers\WkWebViewRenderer.cs (1)
195 catch (UriFormatException formatException)
Microsoft.Maui.Essentials (12)
Launcher\Launcher.shared.cs (12)
24 /// <exception cref="UriFormatException">Thrown when <paramref name="uri"/> is malformed.</exception> 32 /// <exception cref="UriFormatException">Thrown when <paramref name="uri"/> is malformed.</exception> 47 /// <exception cref="UriFormatException">Thrown when <paramref name="uri"/> is malformed.</exception> 66 /// <exception cref="UriFormatException">Thrown when <paramref name="uri"/> is malformed.</exception> 75 /// <exception cref="UriFormatException">Thrown when <paramref name="uri"/> is malformed.</exception> 84 /// <exception cref="UriFormatException">Thrown when <paramref name="uri"/> is malformed.</exception> 93 /// <exception cref="UriFormatException">Thrown when <paramref name="uri"/> is malformed.</exception> 110 /// <exception cref="UriFormatException">Thrown when <paramref name="uri"/> is malformed.</exception> 119 /// <exception cref="UriFormatException">Thrown when <paramref name="uri"/> is malformed.</exception> 185 /// <exception cref="UriFormatException">Thrown when <paramref name="uri"/> is malformed.</exception> 195 /// <exception cref="UriFormatException">Thrown when <paramref name="uri"/> is malformed.</exception> 205 /// <exception cref="UriFormatException">Thrown when <paramref name="uri"/> is malformed.</exception>
Microsoft.VisualStudio.LanguageServices (1)
NavigateTo\RoslynSearchResultViewFactory.cs (1)
77catch (UriFormatException)
MSBuild (1)
ExceptionHandling.cs (1)
182|| e is UriFormatException; // XmlTextReader for example uses this under the covers
MSBuildTaskHost (1)
ExceptionHandling.cs (1)
182|| e is UriFormatException; // XmlTextReader for example uses this under the covers
netstandard (1)
netstandard.cs (1)
2227[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.UriFormatException))]
PresentationCore (1)
System\Windows\Media\FontFamily.cs (1)
542catch (UriFormatException)
PresentationUI (1)
MS\Internal\Documents\RMPublishingDialog.cs (1)
349catch (UriFormatException e)
ReachFramework (1)
Serialization\ImageSourceTypeConverter.cs (1)
237catch (UriFormatException)
System (1)
src\libraries\shims\System\ref\System.cs (1)
927[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.UriFormatException))]
System.Net.WebClient (1)
System\Net\WebClient.cs (1)
168catch (UriFormatException e)
System.Private.Uri (21)
System\Uri.cs (7)
524relativeUri = baseUri.Syntax.InternalResolve(baseUri, this, out UriFormatException? e); 570newUriString = baseUri.Syntax.InternalResolve(baseUri, this, out UriFormatException? e); 649private static UriFormatException? GetException(ParsingError err) 1949internal UriFormatException? ParseMinimal() 3376UriFormatException e = GetException(ParsingError.SizeLimit)!; 3512UriFormatException e = GetException(ParsingError.SizeLimit)!; 3569UriFormatException e = GetException(ParsingError.SizeLimit)!;
System\UriExt.cs (10)
41InitializeUri(err, uriKind, out UriFormatException? e); 46private void InitializeUri(ParsingError err, UriKind uriKind, out UriFormatException? e) 134catch (UriFormatException ex) 185catch (UriFormatException ex) 277UriFormatException? e = null; 297UriFormatException? e = null; 327UriFormatException? e = null; 754internal static Uri? CreateHelper(string uriString, bool dontEscape, UriKind uriKind, ref UriFormatException? e, in UriCreationOptions creationOptions = default) 798catch (UriFormatException ee) 1019UriFormatException? e = null;
System\UriScheme.cs (2)
65protected virtual void InitializeAndValidate(Uri uri, out UriFormatException? parsingError) 98protected virtual string? Resolve(Uri baseUri, Uri? relativeUri, out UriFormatException? parsingError)
System\UriSyntax.cs (2)
265internal void InternalValidate(Uri thisUri, out UriFormatException? parsingError) 275internal string? InternalResolve(Uri thisBaseUri, Uri uriLink, out UriFormatException? parsingError)
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
858[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.UriFormatException))]
System.ServiceModel.NetFramingBase (1)
System\ServiceModel\Channels\FramingDecoders.cs (1)
234catch (UriFormatException exception)
System.ServiceModel.Primitives.Tests (2)
ServiceModel\DuplexChannelFactoryTest.cs (2)
46Assert.Throws<UriFormatException>(() => 58Assert.Throws<UriFormatException>(() =>
System.Windows.Forms (5)
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (1)
162catch (UriFormatException)
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (1)
584catch (UriFormatException)
System\Windows\Forms\Controls\WebBrowser\WebBrowserUriTypeConverter.cs (1)
21catch (UriFormatException)
System\Windows\Forms\Help\Help.cs (2)
246catch (UriFormatException) 271catch (UriFormatException)
WindowsBase.Tests (1)
System\Security\RightsManagement\PublishLicenseTests.cs (1)
138Assert.Throws<UriFormatException>(() => new PublishLicense(PublishLicenseTemplate));