Implement StorageBackendError::build() helper
This commit is contained in:
parent
8ff5dcc9e8
commit
d22b991da0
1 changed files with 13 additions and 0 deletions
|
@ -180,6 +180,19 @@ impl StorageBackendError {
|
|||
caused_by: None,
|
||||
}
|
||||
}
|
||||
|
||||
fn build(action: &'static str,
|
||||
desc: &'static str,
|
||||
data : Option<String>) -> StorageBackendError
|
||||
{
|
||||
StorageBackendError {
|
||||
action: String::from(action),
|
||||
desc: String::from(desc),
|
||||
dataDump: data,
|
||||
caused_by: None,
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
impl Error for StorageBackendError {
|
||||
|
|
Loading…
Reference in a new issue