Add param to StoreIdLocalPartAbsoluteError

This commit is contained in:
Matthias Beyer 2017-09-09 21:50:37 +02:00
parent b772908697
commit a670172880
2 changed files with 3 additions and 3 deletions

View File

@ -174,9 +174,9 @@ error_chain! {
display("StoreId handling error")
}
StoreIdLocalPartAbsoluteError {
StoreIdLocalPartAbsoluteError(pb: PathBuf) {
description("StoreId 'id' part is absolute (starts with '/') which is not allowed")
display("StoreId 'id' part is absolute (starts with '/') which is not allowed")
display("StoreId 'id' part is absolute (starts with '/') which is not allowed: {:?}", pb)
}
StoreIdBuildFromFullPathError {

View File

@ -68,7 +68,7 @@ impl StoreId {
pub fn new_baseless(id: PathBuf) -> Result<StoreId> {
debug!("Trying to get a new baseless id from: {:?}", id);
if id.is_absolute() {
Err(SE::from_kind(SEK::StoreIdLocalPartAbsoluteError))
Err(SE::from_kind(SEK::StoreIdLocalPartAbsoluteError(id)))
} else {
Ok(StoreId {
base: None,