From 9a960b9f5804f5e855163e7ec43327c28daef845 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 10 Dec 2018 17:50:41 -0500 Subject: Use stderr for exceptions (#1303) --- src/deno_dir.rs | 2 +- src/main.rs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/deno_dir.rs b/src/deno_dir.rs index 6321d3a03..a3b134f84 100644 --- a/src/deno_dir.rs +++ b/src/deno_dir.rs @@ -141,7 +141,7 @@ impl DenoDir { let mt = Path::new(&media_type_filename); let src = if self.reload || !p.exists() { - println!("Downloading {}", module_name); + eprintln!("Downloading {}", module_name); let (source, content_type) = http_util::fetch_sync_string(module_name)?; match p.parent() { Some(ref parent) => fs::create_dir_all(parent), diff --git a/src/main.rs b/src/main.rs index cdb7d8dd0..bcc18511c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -72,9 +72,7 @@ impl log::Log for Logger { } fn print_err_and_exit(err: js_errors::JSError) { - // TODO Currently tests depend on exception going to stdout. It should go - // to stderr. https://github.com/denoland/deno/issues/964 - println!("{}", err.to_string()); + eprintln!("{}", err.to_string()); std::process::exit(1); } -- cgit v1.2.3