Begin removing the MyError type.
This commit is contained in:
@@ -28,7 +28,6 @@ use crate::context::ExitClass;
|
||||
use crate::context::ExitMatcherNode;
|
||||
use crate::context::RefContext;
|
||||
use crate::error::CustomError;
|
||||
use crate::error::MyError;
|
||||
use crate::error::Res;
|
||||
use crate::parser::element_parser::element;
|
||||
use crate::parser::util::blank_line;
|
||||
@@ -232,6 +231,9 @@ fn greater_block_body<'c, 'b, 'g, 'r, 's>(
|
||||
context_name: &'c str,
|
||||
) -> Res<OrgSource<'s>, (&'s str, Vec<Element<'s>>)> {
|
||||
if in_section(context, context_name) {
|
||||
return Err(CustomError::Static(
|
||||
"Cannot nest objects of the same element",
|
||||
));
|
||||
return Err(nom::Err::Error(CustomError::MyError(MyError(
|
||||
"Cannot nest objects of the same element",
|
||||
))));
|
||||
|
||||
Reference in New Issue
Block a user