@@ -330,8 +330,7 @@ downloadOrRead sourceURL s = do
330330 convertSlash x = x
331331
332332withPaths :: PandocMonad m => [FilePath] -> (FilePath -> m a) -> FilePath -> m a
333−withPaths [] _ fp = throwError $ PandocIOError fp
334− (userError "file not found in resource path")
333+withPaths [] _ fp = throwError $ PandocResourceNotFound fp
335334withPaths (p:ps) action fp =
336335 catchError (action (p </> fp))
337336 (\_ -> withPaths ps action fp)
@@ -433,20 +432,17 @@ instance PandocMonad PandocPure where
433432 modifyPureState $ \st -> st { stUniqStore = us }
434433 return u
435434 _ -> M.fail "uniq store ran out of elements"
436− openURL u = throwError $ PandocIOError u $
437− userError "Cannot open URL in PandocPure"
435+ openURL u = throwError $ PandocResourceNotFound u
438436 readFileLazy fp = do
439437 fps <- getsPureState stFiles
440438 case infoFileContents <$> getFileInfo fp fps of
441439 Just bs -> return (BL.fromStrict bs)
442− Nothing -> throwError $ PandocIOError fp
443− (userError "File not found in PureState")
440+ Nothing -> throwError $ PandocResourceNotFound fp
444441 readFileStrict fp = do
445442 fps <- getsPureState stFiles
446443 case infoFileContents <$> getFileInfo fp fps of
447444 Just bs -> return bs
448− Nothing -> throwError $ PandocIOError fp
449− (userError "File not found in PureState")
445+ Nothing -> throwError $ PandocResourceNotFound fp
450446 readDataFile Nothing "reference.docx" = do
451447 (B.concat . BL.toChunks . fromArchive) <$> getsPureState stReferenceDocx
452448 readDataFile Nothing "reference.odt" = do