Raxol.Core.ErrorTemplates (Raxol v2.0.1)

View Source

Enhanced error message templates for Phase 4.3 Error Experience.

Provides contextual, actionable error messages that reference:

  • Phase 3 performance optimizations and targets
  • Phase 4.2 development tools for debugging
  • Specific fix suggestions with confidence ratings
  • Interactive recovery workflows

Summary

Functions

Generate a formatted error message with Phase 3/4 context.

Get an enhanced error template based on error type and context.

Get all available templates for a category.

Get template suggestions based on error pattern matching.

Types

error_template()

@type error_template() :: %{
  title: String.t(),
  description: String.t(),
  phase3_context: String.t() | nil,
  suggested_actions: [String.t()],
  related_tools: [atom()],
  recovery_steps: [String.t()],
  confidence: float()
}

template_context()

@type template_context() :: map()

Functions

format_error_message(template, context \\ %{})

Generate a formatted error message with Phase 3/4 context.

get_template(error_type, context \\ %{})

Get an enhanced error template based on error type and context.

get_templates_by_category(category)

Get all available templates for a category.

suggest_templates(error_text)

Get template suggestions based on error pattern matching.