summaryrefslogtreecommitdiff
path: root/core/error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'core/error.rs')
-rw-r--r--core/error.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/error.rs b/core/error.rs
index 65e2e8da4..1d9df2641 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 range_error(message: impl Into<Cow<'static, str>>) -> AnyError {
+ custom_error("RangeError", message)
+}
+
pub fn invalid_hostname(hostname: &str) -> AnyError {
type_error(format!("Invalid hostname: '{}'", hostname))
}