convert listImportableContents to throwing exceptions
This commit is contained in:
parent
5d8e4a7c74
commit
e1ac42be77
8 changed files with 27 additions and 27 deletions
|
@ -334,9 +334,9 @@ listContents remote importtreeconfig ci tvar = starting "list" ai si $
|
|||
listContents' :: Remote -> ImportTreeConfig -> CheckGitIgnore -> (ImportableContents (ContentIdentifier, Remote.ByteSize) -> Annex a) -> Annex a
|
||||
listContents' remote importtreeconfig ci a =
|
||||
makeImportMatcher remote >>= \case
|
||||
Right matcher -> getImportableContents remote importtreeconfig ci matcher >>= \case
|
||||
Just importable -> a importable
|
||||
Nothing -> giveup $ "Unable to list contents of " ++ Remote.name remote
|
||||
Right matcher -> tryNonAsync (getImportableContents remote importtreeconfig ci matcher) >>= \case
|
||||
Right importable -> a importable
|
||||
Left e -> giveup $ "Unable to list contents of " ++ Remote.name remote ++ ": " ++ show e
|
||||
Left err -> giveup $ unwords
|
||||
[ "Cannot import from"
|
||||
, Remote.name remote
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue