mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-21 05:43:39 +08:00
EPUB reader: Give additional information in error...
if the epub zip container can't be unpacked. See #8663.
This commit is contained in:
@@ -51,7 +51,8 @@ type Items = M.Map Text (FilePath, MimeType)
|
||||
readEPUB :: PandocMonad m => ReaderOptions -> BL.ByteString -> m Pandoc
|
||||
readEPUB opts bytes = case toArchiveOrFail bytes of
|
||||
Right archive -> archiveToEPUB opts archive
|
||||
Left _ -> throwError $ PandocParseError "Couldn't extract ePub file"
|
||||
Left e -> throwError $ PandocParseError $
|
||||
"Couldn't extract ePub file: " <> T.pack e
|
||||
|
||||
-- runEPUB :: Except PandocError a -> Either PandocError a
|
||||
-- runEPUB = runExcept
|
||||
|
||||
Reference in New Issue
Block a user