diff --git a/Cargo.toml b/Cargo.toml index 5f55e48..16daf9c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lolistealer" -version = "1.1.0" +version = "1.2.0" authors = ["Avril "] edition = "2018" diff --git a/src/main.rs b/src/main.rs index c550268..f2fbee3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -42,12 +42,17 @@ async fn main() -> Result<(), Box> let conf = match parse_args() { Ok(v) => v, Err(e) => { - println!("Failed to parse args: {}", e); + eprintln!("Failed to parse args: {}", e); std::process::exit(1) }, }; - work_async::work(conf).await + if let Err(e) = work_async::work(conf).await { + eprintln!("Worker error: {}", e); + std::process::exit(1) + } + + Ok(()) } #[cfg(not(feature="async"))] diff --git a/src/work_async.rs b/src/work_async.rs index 2a80f9b..83317f8 100644 --- a/src/work_async.rs +++ b/src/work_async.rs @@ -158,7 +158,7 @@ pub async fn work(conf: config::Config) -> Result<(), Box if failures.len() > 0 { println!("Reasons for failure(s):"); for failure in failures.into_iter() { - println!("\t{}", failure); + eprintln!("\t{}", failure); } }