Raxol.Core.Utils.ErrorPatterns (Raxol v2.0.1)
View SourceConsolidated error handling patterns used throughout the Raxol codebase. Provides consistent error handling, logging, and recovery mechanisms.
Summary
Functions
Common pattern for handling call timeouts.
Standardized way to handle GenServer initialization errors.
Standardized error recovery with exponential backoff.
Validates input parameters with common validation patterns.
Common pattern for resource cleanup on errors.
Wraps a function call with standardized error handling and logging.
Types
@type result(success) :: {:ok, success} | {:error, error_reason()}
Functions
@spec call_with_timeout(GenServer.server(), any(), timeout()) :: result(any())
Common pattern for handling call timeouts.
Standardized way to handle GenServer initialization errors.
Standardized error recovery with exponential backoff.
@spec validate_params(map(), list()) :: :ok | {:error, error_reason()}
Validates input parameters with common validation patterns.
Common pattern for resource cleanup on errors.
Wraps a function call with standardized error handling and logging.