Add parameter to StorePathExists error
This commit is contained in:
parent
78db822917
commit
ff8569809b
2 changed files with 5 additions and 3 deletions
|
@ -17,6 +17,8 @@
|
|||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
//
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
||||
use storeid::StoreId;
|
||||
|
||||
error_chain! {
|
||||
|
@ -116,9 +118,9 @@ error_chain! {
|
|||
display("Directory/Directories could not be created")
|
||||
}
|
||||
|
||||
StorePathExists {
|
||||
StorePathExists(pb: PathBuf) {
|
||||
description("Store path exists")
|
||||
display("Store path exists")
|
||||
display("Store path exists: {:?}", pb)
|
||||
}
|
||||
|
||||
StorePathCreate {
|
||||
|
|
|
@ -274,7 +274,7 @@ impl Store {
|
|||
.map_dbg_err_str("Failed"));
|
||||
} else if location.is_file() {
|
||||
debug!("Store path exists as file");
|
||||
return Err(SE::from_kind(SEK::StorePathExists));
|
||||
return Err(SE::from_kind(SEK::StorePathExists(location)));
|
||||
}
|
||||
|
||||
let store = Store {
|
||||
|
|
Loading…
Reference in a new issue