From ecb32455c315f5f86800aa0abb54bce80180e1f5 Mon Sep 17 00:00:00 2001 From: Odysseas Gabrielides Date: Thu, 6 Jun 2024 19:13:21 +0300 Subject: [PATCH] better error --- grovedb/src/replication.rs | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/grovedb/src/replication.rs b/grovedb/src/replication.rs index 77daeaea..b64188e2 100644 --- a/grovedb/src/replication.rs +++ b/grovedb/src/replication.rs @@ -247,22 +247,22 @@ impl GroveDb { match chunk_res { Ok((chunk, _)) => match util_encode_vec_ops(chunk) { Ok(op_bytes) => Ok(op_bytes), - Err(_) => Err(Error::CorruptedData( - "Unable to create to load chunk".to_string(), + Err(e) => Err(Error::CorruptedData( + format!("2_no_tx_layered fail_0:{}", e), )), }, - Err(_) => Err(Error::CorruptedData( - "Unable to create to load chunk".to_string(), + Err(e) => Err(Error::CorruptedData( + format!("2_no_tx_layered fail_1:{}", e), )), } } - Err(_) => Err(Error::CorruptedData( - "Unable to create Chunk producer".to_string(), + Err(e) => Err(Error::CorruptedData( + format!("2_no_tx_layered fail_2:{}", e), )), } } Err(e) => Err(Error::CorruptedData( - "Unable to open merk".to_string(), + format!("2_no_tx_layered fail_3:{}", e), )), } } @@ -285,22 +285,22 @@ impl GroveDb { match chunk_res { Ok((chunk, _)) => match util_encode_vec_ops(chunk) { Ok(op_bytes) => Ok(op_bytes), - Err(_) => Err(Error::CorruptedData( - "Unable to create to load chunk".to_string(), + Err(e) => Err(Error::CorruptedData( + format!("2_no_tx_base fail_0:{}", e), )), }, - Err(_) => Err(Error::CorruptedData( - "Unable to create to load chunk".to_string(), + Err(e) => Err(Error::CorruptedData( + format!("2_no_tx_base fail_1:{}", e), )), } } - Err(_) => Err(Error::CorruptedData( - "Unable to create Chunk producer".to_string(), + Err(e) => Err(Error::CorruptedData( + format!("2_no_tx_base fail_2:{}", e), )), } } Err(e) => Err(Error::CorruptedData( - "Unable to open merk".to_string(), + format!("2_no_tx_base fail_3:{}", e), )), } }