diff options
Diffstat (limited to 'core/error.rs')
-rw-r--r-- | core/error.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/error.rs b/core/error.rs index a269d637f..65e2e8da4 100644 --- a/core/error.rs +++ b/core/error.rs @@ -36,6 +36,10 @@ pub fn type_error(message: impl Into<Cow<'static, str>>) -> AnyError { custom_error("TypeError", message) } +pub fn invalid_hostname(hostname: &str) -> AnyError { + type_error(format!("Invalid hostname: '{}'", hostname)) +} + pub fn uri_error(message: impl Into<Cow<'static, str>>) -> AnyError { custom_error("URIError", message) } |