catch more exceptions

Just in case a non-IO exception might somehow be thrown.
This commit is contained in:
Joey Hess 2020-05-12 13:05:06 -04:00
parent 35b3c891af
commit be5caeaf51
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 2 additions and 2 deletions

View file

@ -410,7 +410,7 @@ retrieveExportWithContentIdentifierM dir loc cid dest mkkey p =
storeExportWithContentIdentifierM :: FilePath -> FilePath -> Key -> ExportLocation -> [ContentIdentifier] -> MeterUpdate -> Annex (Either String ContentIdentifier) storeExportWithContentIdentifierM :: FilePath -> FilePath -> Key -> ExportLocation -> [ContentIdentifier] -> MeterUpdate -> Annex (Either String ContentIdentifier)
storeExportWithContentIdentifierM dir src _k loc overwritablecids p = storeExportWithContentIdentifierM dir src _k loc overwritablecids p =
catchIO go (return . Left . show) catchNonAsync go (return . Left . show)
where where
go = do go = do
liftIO $ createDirectoryUnder dir destdir liftIO $ createDirectoryUnder dir destdir

View file

@ -627,7 +627,7 @@ startExternal external = do
} }
p <- propgit g basep p <- propgit g basep
(Just hin, Just hout, Just herr, ph) <- (Just hin, Just hout, Just herr, ph) <-
createProcess p `catchIO` runerr cmdpath createProcess p `catchNonAsync` runerr cmdpath
stderrelay <- async $ errrelayer herr stderrelay <- async $ errrelayer herr
cv <- newTVarIO $ externalDefaultConfig external cv <- newTVarIO $ externalDefaultConfig external
ccv <- newTVarIO id ccv <- newTVarIO id