mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 14:41:11 +00:00
use thiserror instead of derive_more for error handling (#10696)
* use thiserror instead of derive_more for error handling Signed-off-by: koushiro <koushiro.cqx@gmail.com> * Update utils/prometheus/src/lib.rs * Update utils/prometheus/src/lib.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -1391,7 +1391,7 @@ impl<'a> NotificationSenderReady<'a> {
|
||||
}
|
||||
|
||||
/// Error returned by [`NetworkService::send_notification`].
|
||||
#[derive(Debug, derive_more::Display, derive_more::Error)]
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
pub enum NotificationSenderError {
|
||||
/// The notification receiver has been closed, usually because the underlying connection
|
||||
/// closed.
|
||||
@@ -1399,8 +1399,10 @@ pub enum NotificationSenderError {
|
||||
/// Some of the notifications most recently sent may not have been received. However,
|
||||
/// the peer may still be connected and a new `NotificationSender` for the same
|
||||
/// protocol obtained from [`NetworkService::notification_sender`].
|
||||
#[error("The notification receiver has been closed")]
|
||||
Closed,
|
||||
/// Protocol name hasn't been registered.
|
||||
#[error("Protocol name hasn't been registered")]
|
||||
BadProtocol,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user