mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 17:01:09 +00:00
introduce errors with info (#1834)
This commit is contained in:
committed by
GitHub
parent
40ea09389c
commit
f345123748
@@ -16,6 +16,8 @@
|
||||
|
||||
//! Utilities for testing subsystems.
|
||||
|
||||
#![warn(missing_docs)]
|
||||
|
||||
use polkadot_node_subsystem::messages::AllMessages;
|
||||
use polkadot_node_subsystem::{
|
||||
FromOverseer, SubsystemContext, SubsystemError, SubsystemResult, Subsystem,
|
||||
@@ -169,7 +171,8 @@ impl<M: Send + 'static, S: SpawnNamed + Send + 'static> SubsystemContext
|
||||
}
|
||||
|
||||
async fn recv(&mut self) -> SubsystemResult<FromOverseer<M>> {
|
||||
self.rx.next().await.ok_or(SubsystemError)
|
||||
self.rx.next().await
|
||||
.ok_or_else(|| SubsystemError::Context("Receiving end closed".to_owned()))
|
||||
}
|
||||
|
||||
async fn spawn(
|
||||
|
||||
Reference in New Issue
Block a user