Skip to content

Commit 19fd014

Browse files
committed
Add context to error in spawning
1 parent 4e71a37 commit 19fd014

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
mod versions;
1515

1616
use crate::bitcoincore_rpc::jsonrpc::serde_json::Value;
17+
use anyhow::Context;
1718
use bitcoincore_rpc::{Auth, Client, RpcApi};
1819
use log::{debug, error, warn};
1920
use std::ffi::OsStr;
@@ -297,7 +298,8 @@ impl BitcoinD {
297298
.args(&p2p_args)
298299
.args(&conf_args)
299300
.stdout(stdout)
300-
.spawn()?;
301+
.spawn()
302+
.with_context(|| format!("Error while executing {:?}", exe.as_ref()))?;
301303

302304
let node_url_default = format!("{}/wallet/default", rpc_url);
303305
let mut i = 0;

0 commit comments

Comments
 (0)