pub struct HtmlErrorHandler { /* private fields */ }
Expand description
Comprehensive error handler for HTML generation
Implementations§
Source§impl HtmlErrorHandler
impl HtmlErrorHandler
Sourcepub fn with_context(context: ErrorRecoveryContext) -> Self
pub fn with_context(context: ErrorRecoveryContext) -> Self
Create error handler with custom recovery context
Sourcepub fn handle_file_discovery_error(
&mut self,
directory: &str,
base_name: &str,
error: Box<dyn Error + Send + Sync>,
) -> Result<Vec<String>, Box<HtmlGenerationError>>
pub fn handle_file_discovery_error( &mut self, directory: &str, base_name: &str, error: Box<dyn Error + Send + Sync>, ) -> Result<Vec<String>, Box<HtmlGenerationError>>
Handle file discovery errors with recovery
Sourcepub fn handle_file_loading_error(
&mut self,
file_path: PathBuf,
file_type: &str,
file_size: usize,
error: Box<dyn Error + Send + Sync>,
) -> Result<Option<Value>, Box<HtmlGenerationError>>
pub fn handle_file_loading_error( &mut self, file_path: PathBuf, file_type: &str, file_size: usize, error: Box<dyn Error + Send + Sync>, ) -> Result<Option<Value>, Box<HtmlGenerationError>>
Handle file loading errors with recovery
Sourcepub fn handle_json_parsing_error(
&mut self,
file_path: PathBuf,
parsing_error: &str,
) -> HtmlGenerationError
pub fn handle_json_parsing_error( &mut self, file_path: PathBuf, parsing_error: &str, ) -> HtmlGenerationError
Handle JSON parsing errors with detailed context
Sourcepub fn handle_validation_error(
&mut self,
file_path: PathBuf,
validation_type: &str,
validation_error: &str,
json_data: &Value,
) -> HtmlGenerationError
pub fn handle_validation_error( &mut self, file_path: PathBuf, validation_type: &str, validation_error: &str, json_data: &Value, ) -> HtmlGenerationError
Handle validation errors with detailed analysis
Sourcepub fn get_stats(&self) -> &ErrorRecoveryStats
pub fn get_stats(&self) -> &ErrorRecoveryStats
Get error recovery statistics
Sourcepub fn print_recovery_summary(&self)
pub fn print_recovery_summary(&self)
Print error recovery summary
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HtmlErrorHandler
impl RefUnwindSafe for HtmlErrorHandler
impl Send for HtmlErrorHandler
impl Sync for HtmlErrorHandler
impl Unpin for HtmlErrorHandler
impl UnwindSafe for HtmlErrorHandler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more