From fdb7c6716ebb31bfac2d174cbd3adbedd57eca99 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Thu, 21 May 2020 17:42:54 +0100 Subject: errors: Add error case for regex metacharacters detected Signed-off-by: Daniel Silverstone --- src/error.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/error.rs b/src/error.rs index 53128b2..60c850e 100644 --- a/src/error.rs +++ b/src/error.rs @@ -10,6 +10,14 @@ pub enum SubplotError { #[error("simple pattern contains a stray {{ or }}")] StrayBraceInSimplePattern(String), + /// The simple pattern has regex metacharacters. + /// + /// Simple patterns are not permitted to have regex metacharacters in them + /// unless the pattern is explicitly marked `regex: false` to indicate that + /// the binding author understands what they're up to. + #[error("simple pattern contains regex metacharacters: {0}")] + SimplePatternHasMetaCharacters(String), + /// Scenario step does not match a known binding /// /// This may be due to the binding missing entirely, or that the -- cgit v1.2.1