Browse Source

Only add `[...]` omission marker if stderr buffer is full

tags/v0.3.5-rc0
Philipp Oppermann 1 year ago
parent
commit
5bda3338af
Failed to extract signature
2 changed files with 6 additions and 2 deletions
  1. +5
    -1
      binaries/daemon/src/lib.rs
  2. +1
    -1
      libraries/core/src/topics.rs

+ 5
- 1
binaries/daemon/src/lib.rs View File

@@ -1183,7 +1183,11 @@ impl Daemon {
stderr: dataflow
.and_then(|d| d.node_stderr_most_recent.get(&node_id))
.map(|queue| {
let mut s = String::new();
let mut s = if queue.is_full() {
"[...]".into()
} else {
String::new()
};
while let Some(line) = queue.pop() {
s += &line;
}


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

@@ -162,7 +162,7 @@ impl std::fmt::Display for NodeError {
NodeErrorCause::Other { stderr } if stderr.is_empty() => {}
NodeErrorCause::Other { stderr } => {
let line: &str = "---------------------------------------------------------------------------------\n";
write!(f, " with stderr output:\n{line}[...]\n{stderr}{line}")?
write!(f, " with stderr output:\n{line}{stderr}{line}")?
},
}



Loading…
Cancel
Save