Module error

Module error 

Source
Expand description

This module provides error handling functionality for asset workers. It defines a custom error type that can wrap other errors and provide additional context.

The module provides:

  • The AssetWorkerError struct which serves as a universal error type for all worker implementations
  • Methods for creating errors with or without source errors
  • Implementations of standard error traits

§Error Handling Strategy

The error handling strategy in this module follows these principles:

  1. Context Preservation: Errors include both a human-readable message and the original error
  2. Error Propagation: The From trait implementation allows easy conversion from other error types
  3. Diagnostic Information: Errors provide clear and helpful diagnostic information

When implementing worker types, use this error type to provide consistent error handling throughout the asset worker system.

Structs§

AssetWorkerError
A custom error type for asset workers that wraps another error with an optional message.