diff --git a/src/actors.rs b/src/actors.rs index 2f2db43a2..e077e4c0d 100644 --- a/src/actors.rs +++ b/src/actors.rs @@ -1,6 +1,6 @@ use ractor::{async_trait as rasync_trait, Actor, ActorProcessingErr, ActorRef, SupervisionEvent}; use tokio_util::{sync::CancellationToken, task::TaskTracker}; -use tracing::{debug, error}; +use tracing::debug; /// A root actor that listens for cancellation token and stops all sub actors (those who started by spawn_linked). pub struct RootActor; @@ -69,7 +69,7 @@ impl Actor for RootActor { } }, SupervisionEvent::ActorPanicked(who, err) => { - error!("Actor unexpectedly panicked (id: {:?}): {:?}", who, err); + panic!("Actor unexpectedly panicked (id: {:?}): {:?}", who, err); } _ => {} } diff --git a/src/fiber/gossip.rs b/src/fiber/gossip.rs index 1ecf82c18..fe678983a 100644 --- a/src/fiber/gossip.rs +++ b/src/fiber/gossip.rs @@ -2278,8 +2278,8 @@ where SupervisionEvent::ActorTerminated(who, _, _) => { debug!("{:?} terminated", who); } - SupervisionEvent::ActorPanicked(who, _) => { - error!("{:?} panicked", who); + SupervisionEvent::ActorPanicked(who, err) => { + panic!("Actor unexpectedly panicked (id: {:?}): {:?}", who, err); } _ => {} } diff --git a/src/fiber/network.rs b/src/fiber/network.rs index 182b042bb..55933c417 100644 --- a/src/fiber/network.rs +++ b/src/fiber/network.rs @@ -3143,8 +3143,8 @@ where SupervisionEvent::ActorTerminated(who, _, _) => { debug!("Actor {:?} terminated", who); } - SupervisionEvent::ActorPanicked(who, _) => { - error!("Actor {:?} panicked", who); + SupervisionEvent::ActorPanicked(who, err) => { + panic!("Actor unexpectedly panicked (id: {:?}): {:?}", who, err); } _ => {} }