summaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2022-01-03 06:16:07 +0000
committerLars Wirzenius <liw@liw.fi>2022-01-03 06:16:07 +0000
commit0734368d45b349a6ab433c1d41f35a95ea58c9ec (patch)
treeb69c6b84b9ce025d6f7afd92d734452757f4f365 /src/error.rs
parente8082fef03bd04042dad3fb2d0513587c54874ab (diff)
parentb9de4d5e810d07b679ad9ab9e46d58e4c76213cc (diff)
downloadsubplot-0734368d45b349a6ab433c1d41f35a95ea58c9ec.tar.gz
Merge branch 'more-rust-subplots' into 'main'
codegen: Refuse to generate code if the specified template is not present Closes #259 See merge request subplot/subplot!242
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs
index ec88733..bcee4ff 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -125,6 +125,15 @@ pub enum SubplotError {
#[error("document has more than one template possibility")]
AmbiguousTemplate,
+ /// Document does not support the requested template
+ ///
+ /// The document YAML metadata does not specify support for the
+ /// stated template.
+ ///
+ /// To fix, specify a template which is provided for in the document.
+ #[error("document lacks specified template support")]
+ TemplateSupportNotPresent,
+
/// Pandoc AST is not JSON
///
/// Subplot acts as a Pandoc filter, and as part of that Pandoc