summaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers+gitlab@digital-scurf.org>2021-04-16 15:00:46 +0000
committerDaniel Silverstone <dsilvers+gitlab@digital-scurf.org>2021-04-16 15:00:46 +0000
commitec9652a72aa8ff47fa64b8a1b5ba9afe84be4f7e (patch)
tree78909e33d39a99dfd99360d6a29b35dd459d6c00 /src/error.rs
parent164666a8640d7a42949817f3d79c1f34b9e2ec24 (diff)
parent9ed32d57ef7e63c4d2d6fa21ca4f07d488e967da (diff)
downloadsubplot-ec9652a72aa8ff47fa64b8a1b5ba9afe84be4f7e.tar.gz
Merge branch 'nohow' into 'main'
refactor: don't use anyhow in the library part of the crate Closes #169 See merge request larswirzenius/subplot!149
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/error.rs b/src/error.rs
index 73cfbb6..eb70e28 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -12,7 +12,7 @@ pub enum SubplotError {
/// Subplot could not find a file named as a functions file.
#[error("functions file could not be found: {0}: {1}")]
- FunctionsFileNotFound(PathBuf, anyhow::Error),
+ FunctionsFileNotFound(PathBuf, std::io::Error),
/// The simple pattern specifies a kind that is unknown.
#[error("simple pattern kind {0} is unknown")]
@@ -204,6 +204,10 @@ pub enum SubplotError {
#[error("Couldn't find name of directory containing template spec: {0}")]
NoTemplateSpecDirectory(PathBuf),
+ /// A code template has an error.
+ #[error("Couldn't load template {0}: {1}")]
+ TemplateError(String, tera::Error),
+
/// Unknown classes in use in document
#[error("Unknown classes found in the document: {0}")]
UnknownClasses(String),