Add more detailed errors
This commit is contained in:
parent
fb475784be
commit
e92fe89270
2 changed files with 3 additions and 0 deletions
|
@ -40,6 +40,7 @@ generate_error_module!(
|
|||
RepositoryPathAddingError => "Error while adding Path to Index",
|
||||
RepositoryCommittingError => "Error while committing",
|
||||
RepositoryParentFetchingError => "Error while fetching parent of commit",
|
||||
RepositoryStatusFetchError => "Error while fetching repository status",
|
||||
|
||||
HeadFetchError => "Error while getting HEAD",
|
||||
NotOnBranch => "No Branch is checked out",
|
||||
|
|
|
@ -160,6 +160,7 @@ impl StoreIdAccessor for StoreUnloadHook {
|
|||
})
|
||||
.any(|s| s == new || s == modif || s == del || s == ren)
|
||||
})
|
||||
.map_err_into(GHEK::RepositoryStatusFetchError)
|
||||
.map_err_into(GHEK::RepositoryError)
|
||||
.map_into_hook_error()
|
||||
};
|
||||
|
@ -168,6 +169,7 @@ impl StoreIdAccessor for StoreUnloadHook {
|
|||
if add_wt_changes_before_committing(cfg) {
|
||||
debug!("Adding WT changes before committing.");
|
||||
try!(index.add_all(&["*"], ADD_DEFAULT, None)
|
||||
.map_err_into(GHEK::RepositoryPathAddingError)
|
||||
.map_err_into(GHEK::RepositoryError)
|
||||
.map_into_hook_error());
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue