convert renameExport to throw exception
Finishes the transition to make remote methods throw exceptions, rather than silently hide them. A bit on the fence about this one, because when renameExport fails, it falls back to deleting instead, and so does the user care why it failed? However, it did let me clean up several places in the code. This commit was sponsored by Ethan Aubin.
This commit is contained in:
parent
00448349de
commit
6361074174
11 changed files with 64 additions and 89 deletions
|
@ -258,9 +258,12 @@ data ExportActions a = ExportActions
|
|||
-- Throws an exception if the remote cannot be accessed.
|
||||
, checkPresentExport :: Key -> ExportLocation -> a Bool
|
||||
-- Renames an already exported file.
|
||||
-- This may fail with False, if the file doesn't exist.
|
||||
--
|
||||
-- If the remote does not support renames, it can return Nothing.
|
||||
, renameExport :: Key -> ExportLocation -> ExportLocation -> a (Maybe Bool)
|
||||
--
|
||||
-- Throws an exception if the remote cannot be accessed, or
|
||||
-- the file doesn't exist or cannot be renamed.
|
||||
, renameExport :: Key -> ExportLocation -> ExportLocation -> a (Maybe ())
|
||||
}
|
||||
|
||||
data ImportActions a = ImportActions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue