Skip to content

Commit

Permalink
better error
Browse files Browse the repository at this point in the history
  • Loading branch information
ogabrielides committed Jun 6, 2024
1 parent 7628068 commit ecb3245
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions grovedb/src/replication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
)),
}
}
Expand All @@ -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),
)),
}
}
Expand Down

0 comments on commit ecb3245

Please sign in to comment.