From 598ece765e073e86c297325cfee85dadf284e8e0 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Tue, 28 Feb 2023 16:03:48 +0100 Subject: [PATCH] Don't panic in runtime when operator panics --- binaries/runtime/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/binaries/runtime/src/lib.rs b/binaries/runtime/src/lib.rs index 91831f0f..b6c733e0 100644 --- a/binaries/runtime/src/lib.rs +++ b/binaries/runtime/src/lib.rs @@ -136,7 +136,9 @@ async fn run( OperatorEvent::Error(err) => { bail!(err.wrap_err(format!("operator {operator_id} failed"))) } - OperatorEvent::Panic(payload) => std::panic::resume_unwind(payload), + OperatorEvent::Panic(payload) => { + bail!("operator {operator_id} panicked: {payload:?}"); + } OperatorEvent::Finished { reason } => { if let StopReason::ExplicitStopAll = reason { let hlc = dora_core::message::uhlc::HLC::default();