From 0690529ce5c179141daf0ecc2c0a86500dc5a164 Mon Sep 17 00:00:00 2001 From: john xu Date: Sat, 25 May 2024 00:54:25 +0800 Subject: [PATCH] chore: add error detail --- host/src/lib.rs | 1 - provers/sgx/guest/src/main.rs | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/host/src/lib.rs b/host/src/lib.rs index 4a16ab52f..24a07861f 100644 --- a/host/src/lib.rs +++ b/host/src/lib.rs @@ -30,7 +30,6 @@ use clap::Parser; use raiko_lib::consts::SupportedChainSpecs; use serde::{Deserialize, Serialize}; use serde_json::Value; -use tracing::info; type MerkleProof = HashMap; diff --git a/provers/sgx/guest/src/main.rs b/provers/sgx/guest/src/main.rs index 93d529b58..6a02ea1b5 100644 --- a/provers/sgx/guest/src/main.rs +++ b/provers/sgx/guest/src/main.rs @@ -5,7 +5,7 @@ mod signature; extern crate rand; extern crate secp256k1; -use anyhow::Result; +use anyhow::{anyhow, Result}; use app_args::{App, Command}; use clap::Parser; use one_shot::{bootstrap, load_bootstrap, one_shot}; @@ -26,7 +26,7 @@ pub async fn main() -> Result<()> { Command::Check => { println!("Checking if bootstrap is readable"); load_bootstrap(&args.global_opts.secrets_dir) - .map_err(|_| anyhow::Error::msg("check booststrap failed"))?; + .map_err(|err| anyhow!("check booststrap failed: {}", err))?; } }