make storeExport throw exceptions

This commit is contained in:
Joey Hess 2020-05-15 12:17:15 -04:00
parent dc7dc1e179
commit 4814b444dd
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
11 changed files with 99 additions and 105 deletions

View file

@ -231,7 +231,8 @@ data ExportActions a = ExportActions
-- Exports content to an ExportLocation.
-- The exported file should not appear to be present on the remote
-- until all of its contents have been transferred.
{ storeExport :: FilePath -> Key -> ExportLocation -> MeterUpdate -> a Bool
-- Throws exception on failure.
{ storeExport :: FilePath -> Key -> ExportLocation -> MeterUpdate -> a ()
-- Retrieves exported content to a file.
-- (The MeterUpdate does not need to be used if it writes
-- sequentially to the file.)
@ -293,6 +294,8 @@ data ImportActions a = ImportActions
-- needs to make sure that the ContentIdentifier it returns
-- corresponds to what it wrote, not to what some other writer
-- wrote.
--
-- Throws exception on failure.
, storeExportWithContentIdentifier
:: FilePath
-> Key
@ -300,7 +303,7 @@ data ImportActions a = ImportActions
-- old content that it's safe to overwrite
-> [ContentIdentifier]
-> MeterUpdate
-> a (Either String ContentIdentifier)
-> a ContentIdentifier
-- This is used rather than removeExport when a special remote
-- supports imports.
--