mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-29 17:18:08 -05:00
chore: more error context for failed to open (#2215)
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
#[derive(Debug, thiserror::Error, PartialEq, Eq, Clone)]
|
||||
pub enum Error {
|
||||
/// Failed to open database.
|
||||
#[error("{0:?}")]
|
||||
DatabaseLocation(i32),
|
||||
#[error("Failed to open database: {0:?}")]
|
||||
FailedToOpen(i32),
|
||||
/// Failed to create a table in database.
|
||||
#[error("Table Creating error code: {0:?}")]
|
||||
TableCreation(i32),
|
||||
|
||||
@@ -74,7 +74,7 @@ impl<E: EnvironmentKind> Env<E> {
|
||||
..Default::default()
|
||||
})
|
||||
.open(path)
|
||||
.map_err(|e| Error::DatabaseLocation(e.into()))?,
|
||||
.map_err(|e| Error::FailedToOpen(e.into()))?,
|
||||
};
|
||||
|
||||
Ok(env)
|
||||
|
||||
Reference in New Issue
Block a user