diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2019-06-20 12:07:01 +1000 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-06-19 19:07:01 -0700 |
commit | 425df50484f315dcd63b4d93ab6911702779899e (patch) | |
tree | 61d95f3773f254e1ed17d915ad927d40a1caeeea /cli/http_util.rs | |
parent | 43f48386d7921612c5cbe7d39a4dfb82a3f3367e (diff) |
Combine CLI Errors (#2487)
Diffstat (limited to 'cli/http_util.rs')
-rw-r--r-- | cli/http_util.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cli/http_util.rs b/cli/http_util.rs index 13d1ce45b..a3310b1bf 100644 --- a/cli/http_util.rs +++ b/cli/http_util.rs @@ -1,6 +1,6 @@ // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license. -use crate::errors; -use crate::errors::DenoError; +use crate::deno_error; +use crate::deno_error::DenoError; #[cfg(test)] use futures::future::{loop_fn, Loop}; use futures::{future, Future, Stream}; @@ -58,7 +58,7 @@ fn resolve_uri_from_location(base_uri: &Uri, location: &str) -> Uri { } #[cfg(test)] -use crate::errors::DenoResult; +use crate::deno_error::DenoResult; #[cfg(test)] use crate::tokio_util; #[cfg(test)] @@ -108,8 +108,8 @@ pub fn fetch_string_once( } else if response.status().is_client_error() || response.status().is_server_error() { - return Box::new(future::err(errors::new( - errors::ErrorKind::Other, + return Box::new(future::err(deno_error::new( + deno_error::ErrorKind::Other, format!("Import '{}' failed: {}", &url, response.status()), ))); } @@ -165,8 +165,8 @@ pub fn fetch_string( return Ok(Loop::Continue((client, new_url))); } if !response.status().is_success() { - return Err(errors::new( - errors::ErrorKind::NotFound, + return Err(deno_error::new( + deno_error::ErrorKind::NotFound, "module not found".to_string(), )); } |