Print errors to stderr instead of stdout
This commit is contained in:
parent
3368457096
commit
e05f117def
|
@ -144,7 +144,12 @@ fn main() {
|
|||
sync(&connection, get_auth_token(&config_dir), datasets, all)
|
||||
}
|
||||
|
||||
_ => println!("This feature is currently unimplemented."),
|
||||
Subcommands::Ranking {
|
||||
subcommand: RankingSC::Create,
|
||||
dataset,
|
||||
} => ranking_create(&connection, dataset),
|
||||
|
||||
_ => eprintln!("This feature is currently unimplemented."),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,12 +10,12 @@ pub const SECS_IN_DAY: u64 = SECS_IN_HR * 24;
|
|||
pub const SECS_IN_WEEK: u64 = SECS_IN_DAY * 7;
|
||||
|
||||
pub fn error(msg: &str, code: i32) -> ! {
|
||||
println!("\nERROR: {}", msg);
|
||||
eprintln!("\nERROR: {}", msg);
|
||||
exit(code)
|
||||
}
|
||||
|
||||
pub fn issue(msg: &str, code: i32) -> ! {
|
||||
println!("\n{}", msg);
|
||||
eprintln!("\n{}", msg);
|
||||
exit(code)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue