27 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)
213throw new UriFormatException($"Failed create URI from '{uriString}'; original string: '{absolutePath}'", e);
Microsoft.Extensions.AI.Abstractions (4)
Contents\DataUriParser.cs (4)
31throw new UriFormatException("Invalid data URI format: the data URI must start with 'data:'."); 40throw new UriFormatException("Invalid data URI format: the data URI must contain a comma separating the metadata and the data."); 57throw new UriFormatException("Invalid data URI format: the data URI is base64-encoded, but the data is not a valid base64 string."); 66throw new UriFormatException("Invalid data URI format: the media type is not a valid.");
PresentationCore (3)
System\Windows\Navigation\BaseUriHelper.cs (3)
274throw new UriFormatException(SR.WrongFirstSegment); 295throw new UriFormatException(SR.WrongFirstSegment); 306throw new UriFormatException(SR.WrongFirstSegment);
System.Private.Uri (16)
System\DomainNameHelper.cs (2)
208throw new UriFormatException(SR.net_uri_BadUnicodeHostForIdn); 214throw new UriFormatException(SR.net_uri_BadUnicodeHostForIdn);
System\Uri.cs (13)
706return new UriFormatException(SR.net_uri_BadFormat); 708return new UriFormatException(SR.net_uri_BadScheme); 710return new UriFormatException(SR.net_uri_BadAuthority); 712return new UriFormatException(SR.net_uri_EmptyUri); 715return new UriFormatException(SR.net_uri_SchemeLimit); 717return new UriFormatException(SR.net_uri_MustRootedPath); 720return new UriFormatException(SR.net_uri_BadHostName); 722return new UriFormatException(SR.net_uri_BadFormat); 724return new UriFormatException(SR.net_uri_BadPort); 726return new UriFormatException(SR.net_uri_BadAuthorityTerminator); 728return new UriFormatException(SR.net_uri_CannotCreateRelative); 732return new UriFormatException(SR.net_uri_BadFormat); 2685throw new UriFormatException(SR.Format(SR.net_uri_PortOutOfRange, _syntax.GetType(), portStr));
System\UriBuilder.cs (1)
310throw new UriFormatException(SR.net_uri_BadUserPassword);
76 references to UriFormatException
Aspire.Hosting (1)
ApplicationModel\ExpressionResolver.cs (1)
141catch (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.CodeAnalysis.LanguageServer.Protocol (6)
Extensions\ProtocolConversions.cs (4)
195/// <exception cref="UriFormatException"> 209catch (UriFormatException e) 221/// <exception cref="UriFormatException"> 491catch (UriFormatException)
Handler\References\FindUsagesLSPContext.cs (1)
289catch (UriFormatException e) when (FatalError.ReportAndCatch(e))
Protocol\DocumentUri.cs (1)
62catch (UriFormatException)
Microsoft.Extensions.AI.Abstractions.Tests (16)
Contents\DataContentTests.cs (15)
27[InlineData("data:", typeof(UriFormatException))] // data missing comma 28[InlineData("data:something,", typeof(UriFormatException))] // mime type without subtype 29[InlineData("data:something;else,data", typeof(UriFormatException))] // mime type without subtype 30[InlineData("data:type/subtype;;parameter=value;else,", typeof(UriFormatException))] // parameter without value 31[InlineData("data:type/subtype;parameter=va=lue;else,", typeof(UriFormatException))] // parameter with multiple = 32[InlineData("data:type/subtype;=value;else,", typeof(UriFormatException))] // empty parameter name 33[InlineData("data:image/j/peg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD", typeof(UriFormatException))] // multiple slashes in media type 36[InlineData("data:text;base64,something!", typeof(UriFormatException))] // Invalid base64 due to invalid character '!' 37[InlineData("data:text/plain;base64,U29tZQ==\t", typeof(UriFormatException))] // Invalid base64 due to tab character 38[InlineData("data:text/plain;base64,U29tZQ==\r", typeof(UriFormatException))] // Invalid base64 due to carriage return character 39[InlineData("data:text/plain;base64,U29tZQ==\n", typeof(UriFormatException))] // Invalid base64 due to line feed character 40[InlineData("data:text/plain;base64,U29t\r\nZQ==", typeof(UriFormatException))] // Invalid base64 due to carriage return and line feed characters 41[InlineData("data:text/plain;base64,U29", typeof(UriFormatException))] // Invalid base64 due to missing padding 42[InlineData("data:text/plain;base64,U29tZQ", typeof(UriFormatException))] // Invalid base64 due to missing padding 43[InlineData("data:text/plain;base64,U29tZQ=", typeof(UriFormatException))] // Invalid base64 due to missing padding
Contents\UriContentTests.cs (1)
17Assert.Throws<UriFormatException>(() => new UriContent("notauri", "image/png"));
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)
netstandard (1)
netstandard.cs (1)
2227[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.UriFormatException))]
PresentationCore (1)
System\Windows\Media\FontFamily.cs (1)
541catch (UriFormatException)
PresentationUI (1)
MS\Internal\Documents\RMPublishingDialog.cs (1)
348catch (UriFormatException e)
ReachFramework (1)
Serialization\ImageSourceTypeConverter.cs (1)
236catch (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 (18)
System\Uri.cs (4)
573relativeUri = baseUri.Syntax.InternalResolve(baseUri, this, out UriFormatException? e); 619newUriString = baseUri.Syntax.InternalResolve(baseUri, this, out UriFormatException? e); 698private static UriFormatException? GetException(ParsingError err) 1996internal UriFormatException? ParseMinimal()
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) 273UriFormatException? e = null; 293UriFormatException? e = null; 323UriFormatException? e = null; 750internal static Uri? CreateHelper(string uriString, bool dontEscape, UriKind uriKind, ref UriFormatException? e, in UriCreationOptions creationOptions = default) 794catch (UriFormatException ee) 1015UriFormatException? 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)
881[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)
158catch (UriFormatException)
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (1)
581catch (UriFormatException)
System\Windows\Forms\Controls\WebBrowser\WebBrowserUriTypeConverter.cs (1)
21catch (UriFormatException)
System\Windows\Forms\Help\Help.cs (2)
246catch (UriFormatException) 271catch (UriFormatException)
System.Windows.Forms.Tests (2)
System\Windows\Forms\HtmlElementErrorEventArgsTests.cs (1)
43action.Should().Throw<UriFormatException>();
System\Windows\Forms\WebBrowserUriTypeConverterTests.cs (1)
52action.Should().Throw<UriFormatException>();
WindowsBase.Tests (1)
System\Security\RightsManagement\PublishLicenseTests.cs (1)
138Assert.Throws<UriFormatException>(() => new PublishLicense(PublishLicenseTemplate));