Skip to content

Commit

Permalink
fix(mapper): Panic on inter-stage channel error (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
scarmuega authored Jan 16, 2022
1 parent acd8441 commit 83896b5
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/mapper/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ impl EventWriter {
fingerprint: None,
};

self.output.send(evt)?;
self.output
.send(evt)
.expect("error sending event through output stage, pipeline must have crashed.");

Ok(())
}
Expand All @@ -87,15 +89,7 @@ impl EventWriter {
where
T: Into<EventData>,
{
let evt = Event {
context: self.context.clone(),
data: source.into(),
fingerprint: None,
};

self.output.send(evt)?;

Ok(())
self.append(source.into())
}

pub fn child_writer(&self, mut extra_context: EventContext) -> EventWriter {
Expand Down

0 comments on commit 83896b5

Please sign in to comment.