Add parameter to StorePathExists error

This commit is contained in:
Matthias Beyer 2017-09-09 21:31:13 +02:00
parent 78db822917
commit ff8569809b
2 changed files with 5 additions and 3 deletions

View file

@ -17,6 +17,8 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
// //
use std::path::PathBuf;
use storeid::StoreId; use storeid::StoreId;
error_chain! { error_chain! {
@ -116,9 +118,9 @@ error_chain! {
display("Directory/Directories could not be created") display("Directory/Directories could not be created")
} }
StorePathExists { StorePathExists(pb: PathBuf) {
description("Store path exists") description("Store path exists")
display("Store path exists") display("Store path exists: {:?}", pb)
} }
StorePathCreate { StorePathCreate {

View file

@ -274,7 +274,7 @@ impl Store {
.map_dbg_err_str("Failed")); .map_dbg_err_str("Failed"));
} else if location.is_file() { } else if location.is_file() {
debug!("Store path exists as 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 { let store = Store {