Skip to content

Commit

Permalink
make it clear that its an error by adding "error" to termination code…
Browse files Browse the repository at this point in the history
… msg prefix
  • Loading branch information
jqnatividad committed Sep 8, 2023
1 parent d509456 commit a1a5a62
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
16 changes: 8 additions & 8 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,27 +252,27 @@ sponsored by datHere - Data Infrastructure Engineering
QsvExitCode::Good
},
Err(CliError::Flag(err)) => {
werr!("usage: {err}");
werr!("usage error: {err}");
util::log_end(qsv_args, now);
QsvExitCode::IncorrectUsage
},
Err(CliError::IncorrectUsage(err)) => {
werr!("usage: {err}");
werr!("usage error: {err}");
util::log_end(qsv_args, now);
QsvExitCode::IncorrectUsage
},
Err(CliError::Csv(err)) => {
werr!("csv: {err}");
werr!("csv error: {err}");
util::log_end(qsv_args, now);
QsvExitCode::Bad
},
Err(CliError::Io(ref err)) if err.kind() == io::ErrorKind::BrokenPipe => {
werr!("broken pipe: {err}");
werr!("broken pipe error: {err}");
util::log_end(qsv_args, now);
QsvExitCode::Abort
},
Err(CliError::Io(err)) => {
werr!("io: {err}");
werr!("io error: {err}");
util::log_end(qsv_args, now);
QsvExitCode::Bad
},
Expand All @@ -286,17 +286,17 @@ sponsored by datHere - Data Infrastructure Engineering
QsvExitCode::Bad
},
Err(CliError::Network(msg)) => {
werr!("network: {msg}");
werr!("network error: {msg}");
util::log_end(qsv_args, now);
QsvExitCode::NetworkError
},
Err(CliError::OutOfMemory(msg)) => {
werr!("memory: {msg}");
werr!("out of memory error: {msg}");
util::log_end(qsv_args, now);
QsvExitCode::OutOfMemory
},
Err(CliError::Encoding(msg)) => {
werr!("encoding: {msg}");
werr!("encoding error: {msg}");
util::log_end(qsv_args, now);
QsvExitCode::EncodingError
},
Expand Down
16 changes: 8 additions & 8 deletions src/maindp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,27 +174,27 @@ Please choose one of the following commands:",
QsvExitCode::Good
},
Err(CliError::Flag(err)) => {
werr!("usage: {err}");
werr!("usage error: {err}");
util::log_end(qsv_args, now);
QsvExitCode::IncorrectUsage
},
Err(CliError::IncorrectUsage(err)) => {
werr!("usage: {err}");
werr!("usage error: {err}");
util::log_end(qsv_args, now);
QsvExitCode::IncorrectUsage
},
Err(CliError::Csv(err)) => {
werr!("csv: {err}");
werr!("csv error: {err}");
util::log_end(qsv_args, now);
QsvExitCode::Bad
},
Err(CliError::Io(ref err)) if err.kind() == io::ErrorKind::BrokenPipe => {
werr!("broken pipe: {err}");
werr!("broken pipe error: {err}");
util::log_end(qsv_args, now);
QsvExitCode::Abort
},
Err(CliError::Io(err)) => {
werr!("io: {err}");
werr!("io error: {err}");
util::log_end(qsv_args, now);
QsvExitCode::Bad
},
Expand All @@ -208,17 +208,17 @@ Please choose one of the following commands:",
QsvExitCode::Bad
},
Err(CliError::Network(msg)) => {
werr!("network: {msg}");
werr!("network error: {msg}");
util::log_end(qsv_args, now);
QsvExitCode::NetworkError
},
Err(CliError::OutOfMemory(msg)) => {
werr!("memory: {msg}");
werr!("out of memory error: {msg}");
util::log_end(qsv_args, now);
QsvExitCode::OutOfMemory
},
Err(CliError::Encoding(msg)) => {
werr!("encoding: {msg}");
werr!("encoding error: {msg}");
util::log_end(qsv_args, now);
QsvExitCode::EncodingError
},
Expand Down
16 changes: 8 additions & 8 deletions src/mainlite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,27 +154,27 @@ Please choose one of the following commands:",
QsvExitCode::Good
},
Err(CliError::Flag(err)) => {
werr!("usage: {err}");
werr!("usage error: {err}");
util::log_end(qsv_args, now);
QsvExitCode::IncorrectUsage
},
Err(CliError::IncorrectUsage(err)) => {
werr!("usage: {err}");
werr!("usage error: {err}");
util::log_end(qsv_args, now);
QsvExitCode::IncorrectUsage
},
Err(CliError::Csv(err)) => {
werr!("csv: {err}");
werr!("csv error: {err}");
util::log_end(qsv_args, now);
QsvExitCode::Bad
},
Err(CliError::Io(ref err)) if err.kind() == io::ErrorKind::BrokenPipe => {
werr!("broken pipe: {err}");
werr!("broken pipe error: {err}");
util::log_end(qsv_args, now);
QsvExitCode::Abort
},
Err(CliError::Io(err)) => {
werr!("io: {err}");
werr!("io error: {err}");
util::log_end(qsv_args, now);
QsvExitCode::Bad
},
Expand All @@ -188,17 +188,17 @@ Please choose one of the following commands:",
QsvExitCode::Bad
},
Err(CliError::Network(msg)) => {
werr!("network: {msg}");
werr!("network error: {msg}");
util::log_end(qsv_args, now);
QsvExitCode::NetworkError
},
Err(CliError::OutOfMemory(msg)) => {
werr!("memory: {msg}");
werr!("out of memory error: {msg}");
util::log_end(qsv_args, now);
QsvExitCode::OutOfMemory
},
Err(CliError::Encoding(msg)) => {
werr!("encoding: {msg}");
werr!("encoding error: {msg}");
util::log_end(qsv_args, now);
QsvExitCode::EncodingError
},
Expand Down

0 comments on commit a1a5a62

Please sign in to comment.