ImageErrorHandler class

Comprehensive error handling and debugging utilities for AI image processing to prevent corruption that causes repeating text patterns in model responses.

Constructors

ImageErrorHandler.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

detectResponseCorruption(String response) CorruptionDetectionResult
Detects and handles model response corruption patterns
handleImageProcessingError(dynamic error, StackTrace stackTrace, {Uint8List? imageBytes, String? context}) ErrorHandlingResult
Handles image processing errors with detailed logging and recovery suggestions
handleTokenizationError(dynamic error, StackTrace stackTrace, {required ModelType modelType, String? prompt, int? expectedImageCount}) ErrorHandlingResult
Handles image tokenization errors with model-specific recovery
handleValidationError(ValidationResult validationResult, {Uint8List? imageBytes, VisionEncoderType? encoderType}) ErrorHandlingResult
Handles vision encoder validation failures