chore: rewrite all error messages for consistency (#5176)

Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>
This commit is contained in:
DaniPopes
2023-10-25 22:12:03 +02:00
committed by GitHub
parent 1c0373b322
commit e05dba69ce
73 changed files with 649 additions and 599 deletions

View File

@ -15,13 +15,13 @@ use thiserror::Error;
#[non_exhaustive]
pub enum Error {
/// The test was skipped
#[error("Test was skipped")]
#[error("test was skipped")]
Skipped,
/// No post state found in test
#[error("No post state found for validation")]
#[error("no post state found for validation")]
MissingPostState,
/// An IO error occurred
#[error("An error occurred interacting with the file system at {path}: {error}")]
#[error("an error occurred interacting with the file system at {path}: {error}")]
Io {
/// The path to the file or directory
path: PathBuf,
@ -30,7 +30,7 @@ pub enum Error {
error: std::io::Error,
},
/// A deserialization error occurred
#[error("An error occurred deserializing the test at {path}: {error}")]
#[error("an error occurred deserializing the test at {path}: {error}")]
CouldNotDeserialize {
/// The path to the file we wanted to deserialize
path: PathBuf,
@ -42,13 +42,13 @@ pub enum Error {
#[error(transparent)]
Database(#[from] DatabaseError),
/// A test assertion failed.
#[error("Test failed: {0}")]
#[error("test failed: {0}")]
Assertion(String),
/// An error internally in reth occurred.
#[error("Test failed: {0}")]
#[error("test failed: {0}")]
RethError(#[from] RethError),
/// An error occurred while decoding RLP.
#[error("An error occurred deserializing RLP")]
#[error("an error occurred deserializing RLP: {0}")]
RlpDecodeError(#[from] alloy_rlp::Error),
}