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
//
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 {

View file

@ -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 {