Browse Source

Slightly tweak error printing

tags/v0.3.5-rc0
Philipp Oppermann 1 year ago
parent
commit
361ea27485
Failed to extract signature
2 changed files with 4 additions and 3 deletions
  1. +1
    -0
      binaries/cli/src/formatting.rs
  2. +3
    -3
      libraries/core/src/topics.rs

+ 1
- 0
binaries/cli/src/formatting.rs View File

@@ -4,6 +4,7 @@ pub struct FormatDataflowError<'a>(pub &'a DataflowResult);

impl std::fmt::Display for FormatDataflowError<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
writeln!(f)?;
let failed = self
.0
.node_results


+ 3
- 3
libraries/core/src/topics.rs View File

@@ -126,7 +126,7 @@ impl std::fmt::Display for NodeError {
match &self.exit_status {
NodeExitStatus::Success => write!(f, "<success>"),
NodeExitStatus::IoError(err) => write!(f, "I/O error while reading exit status: {err}"),
NodeExitStatus::ExitCode(code) => write!(f, "exited with code: {code}"),
NodeExitStatus::ExitCode(code) => write!(f, "exited with code {code}"),
NodeExitStatus::Signal(signal) => {
let signal_str: Cow<_> = match signal {
1 => "SIGHUP".into(),
@@ -156,8 +156,8 @@ impl std::fmt::Display for NodeError {
)?,
NodeErrorCause::Other { stderr } if stderr.is_empty() => {}
NodeErrorCause::Other { stderr } => {
let line: &str = "---------------------------------------------------------------------------------";
write!(f, "\n\nStderr output:\n{line}\n[...]\n{stderr}\n{line}\n")?
let line: &str = "---------------------------------------------------------------------------------\n";
write!(f, "with stderr output:\n{line}[...]\n{stderr}{line}")?
},
}



Loading…
Cancel
Save