28 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 (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);
85 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.Build (1)
ExceptionHandling.cs (1)
181|| e is UriFormatException; // XmlTextReader for example uses this under the covers
Microsoft.Build.Engine.OM.UnitTests (1)
ExceptionHandling.cs (1)
181|| 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)
181|| 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)
181|| e is UriFormatException; // XmlTextReader for example uses this under the covers
Microsoft.CodeAnalysis.LanguageServer.Protocol (6)
Extensions\ProtocolConversions.cs (4)
195/// <exception cref="UriFormatException"> 209catch (UriFormatException e) 221/// <exception cref="UriFormatException"> 489catch (UriFormatException)
Handler\References\FindUsagesLSPContext.cs (1)
283catch (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)
78catch (UriFormatException)
MSBuild (1)
ExceptionHandling.cs (1)
181|| e is UriFormatException; // XmlTextReader for example uses this under the covers
MSBuildTaskHost (1)
ExceptionHandling.cs (1)
181|| 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)
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 (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)
880[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)
581catch (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));