aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2012-04-21 09:27:53 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2012-04-21 09:27:53 -0700
commite6e63d16997322295f098470b85c4756b54d54f0 (patch)
treed635e2bcef1993464ec198af222a04efc7bbd6a7 /src/Text/Pandoc
parent8d4680bbfe6cfcfc1890cf23491edc4fcc3bca04 (diff)
downloadpandoc-e6e63d16997322295f098470b85c4756b54d54f0.tar.gz
Docx writer: Fixed error message when style file can't be parsed.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Writers/Docx.hs3
1 files changed, 2 insertions, 1 deletions
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