diff options
Diffstat (limited to 'cli/deno_error.rs')
-rw-r--r-- | cli/deno_error.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cli/deno_error.rs b/cli/deno_error.rs index 2c53c84f7..346149cd1 100644 --- a/cli/deno_error.rs +++ b/cli/deno_error.rs @@ -96,6 +96,10 @@ pub fn too_many_redirects() -> ErrBox { StaticError(ErrorKind::TooManyRedirects, "too many redirects").into() } +pub fn type_error(msg: String) -> ErrBox { + DenoError::new(ErrorKind::TypeError, msg).into() +} + pub trait GetErrorKind { fn kind(&self) -> ErrorKind; } |