Merge pull request #1233 from Demonthos/log-rebuild-errors

Log errors when a component fails to render
This commit is contained in:
Jonathan Kelley 2023-07-21 15:56:44 -07:00 committed by GitHub
commit 6d2163bfcb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -65,7 +65,12 @@ unsafe impl<'a, P> AnyProps<'a> for VProps<'a, P> {
match res {
Ok(Some(e)) => RenderReturn::Ready(e),
_ => RenderReturn::default(),
Ok(None) => RenderReturn::default(),
Err(err) => {
let component_name = cx.name();
log::error!("Error while rendering component `{component_name}`: {err:?}");
RenderReturn::default()
}
}
}
}