Skip to content

Commit e53e516

Browse files
committed
display a useful error message in the runtimes
1 parent f91bedb commit e53e516

File tree

6 files changed

+9
-6
lines changed

6 files changed

+9
-6
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mithril-aggregator/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mithril-aggregator"
3-
version = "0.2.22"
3+
version = "0.2.23"
44
description = "A Mithril Aggregator server"
55
authors = { workspace = true }
66
edition = { workspace = true }

mithril-aggregator/src/runtime/error.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ pub enum RuntimeError {
6060
#[error("signer registration error: {0}")]
6161
SignerRegistration(#[from] SignerRegistrationError),
6262

63+
#[error("era not supported: {0}")]
64+
EraNotSupported(String),
65+
6366
#[error("general error: {0}")]
6467
General(Box<dyn StdError + Sync + Send>),
6568
}

mithril-aggregator/src/runtime/state_machine.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl AggregatorRuntime {
101101

102102
loop {
103103
if let Err(e) = self.cycle().await {
104-
error!("STATE MACHINE: an error occurred: "; "error" => ?e);
104+
error!("STATE MACHINE: an error occurred: {e}");
105105
}
106106

107107
info!(

mithril-signer/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mithril-signer"
3-
version = "0.2.14"
3+
version = "0.2.15"
44
description = "A Mithril Signer"
55
authors = { workspace = true }
66
edition = { workspace = true }

mithril-signer/src/runtime/state_machine.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ impl StateMachine {
9797

9898
loop {
9999
if let Err(e) = self.cycle().await {
100-
error!("STATE MACHINE: an error occured: "; "error" => ?e);
100+
error!("STATE MACHINE: an error occured: {e}");
101101
}
102102

103103
info!(

0 commit comments

Comments
 (0)