summaryrefslogtreecommitdiff
path: root/src/doc.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc.rs')
-rw-r--r--src/doc.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/doc.rs b/src/doc.rs
index 89b9eea..9c5fae8 100644
--- a/src/doc.rs
+++ b/src/doc.rs
@@ -532,7 +532,13 @@ where
/// Generate code for one document.
pub fn codegen(filename: &Path, output: &Path, template: Option<&str>) -> Result<CodegenOutput> {
- let mut doc = load_document_with_pullmark(filename, Style::default(), template)?;
+ let r = load_document_with_pullmark(filename, Style::default(), template);
+ let mut doc = match r {
+ Ok(doc) => doc,
+ Err(err) => {
+ return Err(err);
+ }
+ };
doc.lint()?;
let template = template
.map(Ok)
@@ -547,7 +553,6 @@ pub fn codegen(filename: &Path, output: &Path, template: Option<&str>) -> Result
|| !doc.check_embedded_files_are_used(&template)?
{
error!("Found problems in document, cannot continue");
- eprintln!("Unable to continue");
std::process::exit(1);
}