improve exception handling
Push it down from needing to be done in every Storer, to being checked once inside ChunkedEncryptable. Also, catch exceptions from PrepareStorer and PrepareRetriever, just in case..
This commit is contained in:
parent
7496355031
commit
9a8c4bb21f
3 changed files with 18 additions and 8 deletions
|
@ -117,7 +117,7 @@ store d chunkconfig k b p = do
|
|||
void $ tryIO $ createDirectoryIfMissing True tmpdir
|
||||
case chunkconfig of
|
||||
LegacyChunks chunksize -> Legacy.store chunksize finalizer k b p tmpdir destdir
|
||||
_ -> flip catchNonAsync (\e -> warningIO (show e) >> return False) $ do
|
||||
_ -> do
|
||||
let tmpf = tmpdir </> keyFile k
|
||||
meteredWriteFile p tmpf b
|
||||
finalizer tmpdir destdir
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue