Skip to content

Commit

Permalink
fix(Type Errors): fixes formatting of error output when failed type p…
Browse files Browse the repository at this point in the history
…arsing
  • Loading branch information
kbknapp committed Jul 20, 2015
1 parent 536d642 commit fe5d95c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,11 @@ macro_rules! value_t_or_exit {
Some(v) => {
match v.parse::<$t>() {
Ok(val) => val,
Err(e) => {
println!("{} '{}' isn't a valid value\n\t{}\n\n{}\n\nPlease re-run with {} for \
Err(..) => {
println!("{} '{}' isn't a valid value\n\n{}\n\nPlease re-run with {} for \
more information",
::clap::Format::Error("error:"),
::clap::Format::Warning(v.to_string()),
e,
$m.usage(),
::clap::Format::Good("--help"));
::std::process::exit(1);
Expand All @@ -306,7 +305,7 @@ macro_rules! value_t_or_exit {
match pv.parse::<$t>() {
Ok(rv) => tmp.push(rv),
Err(_) => {
println!("{} '{}' isn't a valid value\n\t{}\n\nPlease re-run with {} for more \
println!("{} '{}' isn't a valid value\n\n{}\n\nPlease re-run with {} for more \
information",
::clap::Format::Error("error:"),
::clap::Format::Warning(pv),
Expand Down

0 comments on commit fe5d95c

Please sign in to comment.