Files
dioxus/packages/core/src/error_boundary.rs
T

20 lines
380 B
Rust

use std::cell::RefCell;
use crate::ScopeId;
/// A boundary that will capture any errors from child components
#[allow(dead_code)]
pub struct ErrorBoundary {
error: RefCell<Option<(anyhow::Error, ScopeId)>>,
id: ScopeId,
}
impl ErrorBoundary {
pub fn new(id: ScopeId) -> Self {
Self {
error: RefCell::new(None),
id,
}
}
}