diff options
author | Lars Wirzenius <liw@liw.fi> | 2023-05-19 18:10:20 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2023-05-19 18:56:03 +0300 |
commit | db8e6ed8bb22a8afeefddeddfc60abd9204a4517 (patch) | |
tree | 4a70938d9a4c58ac936c0632a192b4bedb98f2b4 /src/doc.rs | |
parent | 2900e794d8c98e5ff6a910d2366320ebbf1da08e (diff) | |
download | subplot-db8e6ed8bb22a8afeefddeddfc60abd9204a4517.tar.gz |
tests: verify that Subplot reports specific errors with location
Sponsored-by: author
Diffstat (limited to 'src/doc.rs')
-rw-r--r-- | src/doc.rs | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -104,20 +104,20 @@ impl Document { { let meta = Metadata::from_yaml_metadata(basedir, yamlmeta, template)?; trace!("metadata from YAML: {:#?}", meta); - let files = Self::all_files(&markdowns); + let files = Self::all_files(&markdowns)?; let doc = Document::new(subplot, markdowns, meta, files, style); trace!("Loaded from JSON OK"); Ok(doc) } - fn all_files(markdowns: &[Markdown]) -> EmbeddedFiles { + fn all_files(markdowns: &[Markdown]) -> Result<EmbeddedFiles, SubplotError> { let mut files = EmbeddedFiles::default(); for md in markdowns { - for file in md.embedded_files().files() { + for file in md.embedded_files()?.files() { files.push(file.clone()); } } - files + Ok(files) } /// Construct a Document from a named file. |