diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-05-24 19:46:20 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-06-06 17:41:39 +0300 |
commit | 95bc7f84bbe909c69783f9ae379af2230ddc0739 (patch) | |
tree | 770947657121fe33a4786cf9c8d14262747a3a2c /src/error.rs | |
parent | 7061fe6957774c80c8deedd2df80416aa7128bd7 (diff) | |
download | subplot-95bc7f84bbe909c69783f9ae379af2230ddc0739.tar.gz |
fix: report name of missing bindings or functions file in error msg
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs index 0057f37..f988c86 100644 --- a/src/error.rs +++ b/src/error.rs @@ -6,6 +6,14 @@ use thiserror::Error; /// Define all the kinds of errors any part of this crate can return. #[derive(Debug, Error)] pub enum SubplotError { + /// Subplot could not find a file named as a bindings file. + #[error("binding file could not be found: {0}: {1}")] + BindingsFileNotFound(PathBuf, std::io::Error), + + /// Subplot could not find a file named as a functions file. + #[error("functions file could not be found: {0}: {1}")] + FunctionsFileNotFound(PathBuf, anyhow::Error), + /// The simple pattern contains a stray { or }. #[error("simple pattern contains a stray {{ or }}")] StrayBraceInSimplePattern(String), |