summaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-07-20 15:47:04 +0300
committerLars Wirzenius <liw@liw.fi>2021-07-20 15:47:40 +0300
commit258ee4398bde99009663ff23521cbfd8324312a0 (patch)
tree0ef9f779477eb2a8b02161ce1255e5283a6c69db /src/error.rs
parent08063f6d7241817cf1a04367be25b0c43202c15b (diff)
downloadsubplot-258ee4398bde99009663ff23521cbfd8324312a0.tar.gz
feat: when more than one bindings match a step, list all of them
Sponsored-by: author
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/error.rs b/src/error.rs
index eb70e28..532714b 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -1,3 +1,5 @@
+use crate::matches::MatchedSteps;
+
use std::path::PathBuf;
use std::process::Output;
@@ -46,8 +48,8 @@ pub enum SubplotError {
///
/// THis may be due to bindings being too general, or having unusual
/// overlaps in their matching
- #[error("more than one binding matches: {0}")]
- BindingNotUnique(String),
+ #[error("more than one binding matches step {0}:\n{1}")]
+ BindingNotUnique(String, MatchedSteps),
/// A binding in the bindings file doesn't specify a known keyword.
#[error("binding doesn't specify known keyword: {0}")]