Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetException()

static UriFormatException System.Uri.GetException ( ParsingError err)
inlinestaticprivate

Definition at line 873 of file Uri.cs.

874 {
875 return err switch
876 {
877 ParsingError.None => null,
878 ParsingError.BadFormat => new UriFormatException(System.SR.net_uri_BadFormat),
879 ParsingError.BadScheme => new UriFormatException(System.SR.net_uri_BadScheme),
880 ParsingError.BadAuthority => new UriFormatException(System.SR.net_uri_BadAuthority),
881 ParsingError.EmptyUriString => new UriFormatException(System.SR.net_uri_EmptyUri),
882 ParsingError.SchemeLimit => new UriFormatException(System.SR.net_uri_SchemeLimit),
883 ParsingError.SizeLimit => new UriFormatException(System.SR.net_uri_SizeLimit),
885 ParsingError.BadHostName => new UriFormatException(System.SR.net_uri_BadHostName),
886 ParsingError.NonEmptyHost => new UriFormatException(System.SR.net_uri_BadFormat),
887 ParsingError.BadPort => new UriFormatException(System.SR.net_uri_BadPort),
890 _ => new UriFormatException(System.SR.net_uri_BadFormat),
891 };
892 }
static string net_uri_BadAuthority
Definition SR.cs:14
static string net_uri_BadPort
Definition SR.cs:26
static string net_uri_EmptyUri
Definition SR.cs:38
static string net_uri_BadScheme
Definition SR.cs:28
static string net_uri_BadFormat
Definition SR.cs:18
static string net_uri_SizeLimit
Definition SR.cs:48
static string net_uri_MustRootedPath
Definition SR.cs:42
static string net_uri_BadHostName
Definition SR.cs:24
static string net_uri_SchemeLimit
Definition SR.cs:36
static string net_uri_BadAuthorityTerminator
Definition SR.cs:16
static string net_uri_CannotCreateRelative
Definition SR.cs:34
Definition SR.cs:7

References System.Runtime.Serialization.Dictionary, System.SR.net_uri_BadAuthority, System.SR.net_uri_BadAuthorityTerminator, System.SR.net_uri_BadFormat, System.SR.net_uri_BadHostName, System.SR.net_uri_BadPort, System.SR.net_uri_BadScheme, System.SR.net_uri_CannotCreateRelative, System.SR.net_uri_EmptyUri, System.SR.net_uri_MustRootedPath, System.SR.net_uri_SchemeLimit, and System.SR.net_uri_SizeLimit.

Referenced by System.Uri.CreateHostStringHelper(), System.Uri.GetHostViaCustomSyntax(), System.Uri.InitializeUri(), System.Uri.ParseMinimal(), and System.Uri.ParseRemaining().