diff --git a/Bookshelf.cabal b/Bookshelf.cabal
--- a/Bookshelf.cabal
+++ b/Bookshelf.cabal
@@ -1,5 +1,5 @@
 name:           Bookshelf
-version:        0.4
+version:        0.5
 synopsis:       A simple document organizer with some wiki functionality
 description:    A simple document organizer with some wiki functionality
 category:       Text
diff --git a/Generate.hs b/Generate.hs
--- a/Generate.hs
+++ b/Generate.hs
@@ -34,6 +34,7 @@
 
 import Text.CSL.Pandoc (processCites)
 import Text.Pandoc
+import Text.Pandoc.Error
 
 import Types
 
@@ -236,7 +237,7 @@
 markdownToHtml :: ShelfInfo -> String -> (String, [FilePath], MetaInfo)
 markdownToHtml shelfInfo markdown = (html,links,meta)
   where
-    pandoc   = readMarkdown def{readerSmart=True} markdown
+    pandoc   = handleError $ readMarkdown def{readerSmart=True} markdown
     links    = queryWith localLink pandoc
     thisMeta = extractMeta pandoc
     mainMeta = parseMainMeta pandoc
