Skip to main content

Module errors

Module errors 

Source
Expand description

Enhanced error handling with contextual information and recovery suggestions

This module provides comprehensive error types with rich context and actionable recovery suggestions to improve developer experience.

Structs§

ErrorContext
Error context information
ErrorMigrationHelper
Migration utilities for common error patterns
TrustformersError
Core error type with context and recovery suggestions

Enums§

ErrorCode
Error codes for documentation
ErrorKind
Specific error kinds

Traits§

ResultExt
Extension trait for adding context to Results
ResultStandardization
Extension trait for Result types to add standardization
StandardError
Standard error interface that all modules should use
TimedResultExt
Result extension trait for adding error context with timing

Functions§

acceleration_error
Helper function for hardware acceleration errors
checkpoint_error
Helper function for checkpoint loading errors
compute_error
Helper function for compute errors
dimension_mismatch
Helper function for dimension mismatch errors
file_not_found
Helper function for file not found errors
hardware_error
Helper function for hardware errors
invalid_config
Helper function for configuration errors
invalid_format
Helper function for invalid format errors
invalid_input
Helper function for invalid input errors
memory_error
Helper function for memory errors
model_compatibility_error
Helper function for model compatibility errors
model_not_found
Helper function for model not found errors
not_implemented
Helper function for not implemented errors
out_of_memory
Helper function for OOM errors
performance_error
Helper function for performance errors
quantization_error
Helper function for quantization errors
resource_exhausted
Helper function for resource exhausted errors
runtime_error
Helper function for runtime errors
shape_mismatch
Helper function for shape mismatch errors
tensor_op_error
Helper function for tensor operation errors
timed_error
Helper function for creating errors with timing information
timeout_error
Helper function for timeout errors
unsupported_operation
Helper function for unsupported operation errors

Type Aliases§

Result
Result type alias