diff options
author | Lars Wirzenius <liw@liw.fi> | 2023-05-18 10:23:02 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2023-05-19 18:10:41 +0300 |
commit | af353507136241eddbdc8bd89324b213fd33ea9f (patch) | |
tree | da6faec01bcffb29694cd21273214673157dde1f /src/error.rs | |
parent | 6fa67e57dfa9f6881bf637ba5469bac05712fa89 (diff) | |
download | subplot-af353507136241eddbdc8bd89324b213fd33ea9f.tar.gz |
feat: add location information to markdown parsing errors
Sponsored-by: author
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/error.rs b/src/error.rs index f7dfe52..e6514b1 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,4 +1,4 @@ -use crate::html::HtmlError; +use crate::html::{HtmlError, Location}; use crate::matches::MatchedSteps; use crate::md::MdError; @@ -148,8 +148,8 @@ pub enum SubplotError { /// scenario block before the first heading in the document. /// /// To fix, add a heading or move the scenario after a heading. - #[error("first scenario is before first heading")] - ScenarioBeforeHeading, + #[error("{0}: first scenario is before first heading")] + ScenarioBeforeHeading(Location), /// Step does not have a keyword. #[error("step has no keyword: {0}")] |