create serde compatible parse error
This commit is contained in:
1 parent
41e905144c
commit
df4ea20bb8
9 files changed
+68
-45
No files matched your search
@@ -1,7 +1,7 @@
|
||||
use captuered_context::CapturedContext;
|
||||
use dioxus_core::{NodeFactory, SchedulerMsg, VNode};
|
||||
use dioxus_hooks::UnboundedSender;
|
||||
use error::Error;
|
||||
use error::{Error, ParseError};
|
||||
use interperter::build;
|
||||
use lazy_static::lazy_static;
|
||||
use serde::{Deserialize, Serialize};
|
||||
@@ -71,7 +71,8 @@ fn interpert_rsx<'a, 'b>(
|
||||
context: captuered_context::CapturedContext<'a>,
|
||||
) -> Result<VNode<'a>, Error> {
|
||||
build(
|
||||
parse_str(text).map_err(|err| Error::ParseError(err))?,
|
||||
parse_str(text)
|
||||
.map_err(|err| Error::ParseError(ParseError::new(err, context.location.clone())))?,
|
||||
context,
|
||||
&factory,
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user