Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/print.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,15 @@ impl<'a, 'b> BacktraceFmt<'a, 'b> {
// Currently a no-op-- including this hook to allow for future additions.
Ok(())
}

/// Inserts a message in the backtrace output.
///
/// This allows information to be inserted between frames,
/// and won't increment the `frame_index` unlike the `frame`
/// method.
pub fn message(&mut self, msg: &str) -> fmt::Result {
self.fmt.write_str(msg)
}
}

/// A formatter for just one frame of a backtrace.
Expand Down