Skip to content

Commit

Permalink
add error print
Browse files Browse the repository at this point in the history
  • Loading branch information
lorbax committed May 14, 2024
1 parent 6567965 commit 04db6a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions utils/message-generator/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Message Generator


Little utility to execute interoperability tests between SRI and other Sv2 complaint software.

## Try it
Expand Down
6 changes: 4 additions & 2 deletions utils/message-generator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use std::{
},
vec::Vec,
};
use tracing::info;
use tracing::{error, info};
use tracing_core::{Event, Subscriber};
use tracing_subscriber::{
filter::EnvFilter,
Expand Down Expand Up @@ -408,7 +408,8 @@ async fn main() {
let pass = Arc::new(AtomicBool::new(false));
{
let fail = fail.clone();
std::panic::set_hook(Box::new(move |_| {
std::panic::set_hook(Box::new(move |info| {
error!("{:#?}", info);
fail.store(true, Ordering::Relaxed);
}));
}
Expand All @@ -430,6 +431,7 @@ async fn main() {
});
}
loop {
tokio::task::yield_now().await;
if fail.load(Ordering::Relaxed) {
clean_up(cleanup).await;
let _ = std::panic::take_hook();
Expand Down

0 comments on commit 04db6a0

Please sign in to comment.