Docx writer: Fixed error message when style file can't be parsed.

This commit is contained in:
John MacFarlane 2012-04-21 09:27:53 -07:00
parent 8d4680bbfe
commit e6e63d1699

View file

@ -146,7 +146,8 @@ writeDocx mbRefDocx opts doc@(Pandoc (Meta tit auths date) _) = do
let styledoc = case findEntryByPath stylepath refArchive >>=
parseXMLDoc . toString . fromEntry of
Just d -> d
Nothing -> error $ stylepath ++ "missing in reference docx"
Nothing -> error $ "Unable to parse " ++ stylepath ++
" from reference.docx"
let styledoc' = styledoc{ elContent = elContent styledoc ++ map Elem newstyles }
let styleEntry = toEntry stylepath epochtime $ fromString $ showTopElement' styledoc'
-- construct word/numbering.xml