diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2021-10-19 19:30:37 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2021-11-19 20:18:50 +0000 |
commit | 5a92266170ae9879b0651e6074e538a4de0a214c (patch) | |
tree | d5ecb647701534d6374f441f2c790bfdd2dca848 /src/error.rs | |
parent | 572d3097770cd8e5cd22d7767c1d18e0d50b9a90 (diff) | |
download | subplot-5a92266170ae9879b0651e6074e538a4de0a214c.tar.gz |
various: Rework document to support multiple implementations
In order to eventually shift the document metadata to support
more than one template defined for the document this reworks
all the internal APIs to expect templates, and also the external
CLI to be able to provide it.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/error.rs b/src/error.rs index c041eaf..ec88733 100644 --- a/src/error.rs +++ b/src/error.rs @@ -112,10 +112,19 @@ pub enum SubplotError { /// The document YAML metadata does not define the template to use /// during code generation. /// - /// To fix, add a `template` field. + /// To fix, ensure an appropriate `impl` entry is present. #[error("document has no template")] MissingTemplate, + /// Document has more than one template + /// + /// The document YAML metadata specifies more than one possible + /// template implementation to be used during code generation. + /// + /// To fix, specify `--template` on the codegen CLI. + #[error("document has more than one template possibility")] + AmbiguousTemplate, + /// Pandoc AST is not JSON /// /// Subplot acts as a Pandoc filter, and as part of that Pandoc |