Skip to main content

Module errors

Module errors 

Source
Expand description

Error types.

Structs§

CannotBeABase
Returned when attempting to join more than the fragment on a cannot-be-a-base URL.
CantBeEmpty
Returned when failing to set a value to empty.
CantBeNone
Returned when failing to set a value to None.
CantEndInANumber
Returned when attempting end a domain in a number.
CantHaveHost
Returned when attempting to set a URL that can’t have a host to have a host.
InsertNotFound
Returned when failing to find an insert.
InvalidDomainHost
Returned when attempting to parse an invalid DomainHost.
InvalidDomainSegment
Returned when attempting to parse an invalid DomainSegment.
InvalidDomainSegments
Returned when attempting to parse an invalid DomainSegments.
InvalidEmptyHost
Returned when failing to parse an empty host.
InvalidFileHost
Returned when attempting to parse an invalid FileHost.
InvalidHost
Returned when attempting to parse an invalid Host.
InvalidIpv4Host
Returned when failing to parse an IPv4 host.
InvalidIpv6Host
Returned when failing to parse an IPv6 host.
InvalidNonSpecialHost
Returned when attempting to parse an invalid NonSpecialHost.
InvalidOpaqueHost
Returned when failing to parse an opaque host.
InvalidPort
Returned when attempting to parse an invalid port.
InvalidPunycode
Returned when attempting to parse invalid Punycode.
InvalidScheme
Returned when failing to parse a scheme.
InvalidSpecialNotFileHost
Returned when attempting to parse an invalid SpecialNotFileHost.
NoDomain
Returned when failing to get a domain.
NoHost
Returned when failing to get a host.
NonFqdnCantEndInEmpty
Returned when attempting to end a non-FQDN DomainHost in an empty segment.
PathIsOpaque
Returned when attempting to get a segmented path from an opaque path.
RangeNotFound
Returned when failing to find a range.
TooLong
Returned when a value is too long.

Enums§

InvalidJoin
BetterUrl::join.
InvalidUrl
The enum of errors that can occur when trying to parse an invalid URL.
SetDomainError
Returned when failing to set some/all of a domain.
SetFragmentError
The errors that can happen when setting a fragment.
SetHostError
Returned when failing to set a host.
SetHostPortError
Returned when failing to set the host + port.
SetPasswordError
The errors that can happen when setting a password.
SetPathError
Returned when failing to set some/all of a path.
SetPortError
The error BetterUrl::set_port returns when it fails.
SetQueryError
Returned when failing to set some/all of a path.
SetSchemeError
The errors that can happen when setting a scheme.
SetUserinfoError
The errors that can happen when setting a userinfo.
SetUsernameError
The errors that can happen when setting a username.