Raxol.Core.ErrorExperience (Raxol v2.6.0)

View Source

Enhanced error experience system for Raxol applications.

Intelligent error handling with:

  • Contextual fix suggestions based on performance optimizations
  • Integration with development tools
  • Pattern learning for common error scenarios
  • Interactive error recovery workflows

Features

  • Smart error classification with performance context
  • Automatic fix suggestions using performance knowledge
  • Integration with mix raxol.analyze and mix raxol.debug
  • Error pattern learning and prevention
  • Interactive recovery console

Summary

Functions

Classify error and provide enhancement based on optimization patterns.

Classify error type for reporting purposes.

Generate automatic error report for learning system.

Enhanced error handling with intelligent suggestions and recovery.

Interactive error recovery console.

Types

enhanced_error()

@type enhanced_error() :: %{
  original_error: term(),
  category: error_category(),
  severity: Raxol.Core.ErrorHandling.error_severity(),
  context: map(),
  suggestions: [fix_suggestion()],
  performance_impact: :none | :low | :medium | :high | :critical,
  related_optimizations: [String.t()],
  recovery_options: [atom()]
}

error_category()

@type error_category() ::
  :performance
  | :compilation
  | :runtime
  | :ui_rendering
  | :terminal_io
  | :component_lifecycle
  | :optimization
  | :integration

fix_suggestion()

@type fix_suggestion() :: %{
  type: :automatic | :guided | :manual | :documentation,
  description: String.t(),
  action: String.t() | nil,
  confidence: float(),
  related_tools: [atom()],
  optimization_context: map() | nil
}

Functions

classify_and_enhance(error, context)

Classify error and provide enhancement based on optimization patterns.

classify_error_type(error)

Classify error type for reporting purposes.

generate_error_report(enhanced_error)

Generate automatic error report for learning system.

handle_enhanced_error(error, context \\ %{})

Enhanced error handling with intelligent suggestions and recovery.

start_recovery_console(enhanced_error)

Interactive error recovery console.