From e6e63d16997322295f098470b85c4756b54d54f0 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 21 Apr 2012 09:27:53 -0700 Subject: Docx writer: Fixed error message when style file can't be parsed. --- src/Text/Pandoc/Writers/Docx.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Text/Pandoc/Writers/Docx.hs') diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs index f2bef9e6b..91f620c5c 100644 --- a/src/Text/Pandoc/Writers/Docx.hs +++ b/src/Text/Pandoc/Writers/Docx.hs @@ -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 -- cgit v1.2.3