include element/attribute in errors
This commit is contained in:
1 parent
d9ee305575
commit
b761bdb767
1 file changed
+2
-2
@@ -103,7 +103,7 @@ fn build_node<'a>(
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return Err(Error::ParseError(ParseError::new(
|
return Err(Error::ParseError(ParseError::new(
|
||||||
syn::Error::new(span, "unknown attribute"),
|
syn::Error::new(span, format!("unknown attribute: {}", name)),
|
||||||
ctx.location.clone(),
|
ctx.location.clone(),
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
@@ -207,7 +207,7 @@ fn build_node<'a>(
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Err(Error::ParseError(ParseError::new(
|
Err(Error::ParseError(ParseError::new(
|
||||||
syn::Error::new(el.name.span(), "unknown element"),
|
syn::Error::new(el.name.span(), format!("unknown element: {}", tag)),
|
||||||
ctx.location.clone(),
|
ctx.location.clone(),
|
||||||
)))
|
)))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user