diff options
-rw-r--r-- | src/pandoc.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pandoc.hs b/src/pandoc.hs index d6b40cc94..0cca48b6f 100644 --- a/src/pandoc.hs +++ b/src/pandoc.hs @@ -521,7 +521,11 @@ options = , Option "" ["bibliography"] (ReqArg (\arg opt -> do - refs <- readBiblioFile arg "" + refs <- catch (readBiblioFile arg "") $ \e -> do + UTF8.hPutStrLn stderr $ + "Error reading bibliography `" ++ arg ++ "'" + UTF8.hPutStrLn stderr $ show e + exitWith (ExitFailure 23) return opt { optBibliography = optBibliography opt ++ refs } ) "FILENAME") |