Sha256: d856d3770fe524c80cef2af5c37696d4e9800ed82c8d27a7cf9b5c67b0927bb1

Contents?: true

Size: 1.04 KB

Versions: 1

Compression:

Stored size: 1.04 KB

Contents

module Domainic
  module Attributer
    # A specialized error class that combines multiple errors into a single error
    #
    # This class encapsulates multiple errors that occur during a single operation and
    # need to be reported together. It maintains a list of individual errors while providing
    # a formatted message that includes details from all errors
    #
    # @api private
    # @!visibility private
    # @author {https://aaronmallen.me Aaron Allen}
    # @since 0.2.0
    class AggregateError < Error
      # Get the collection of errors that were aggregated
      #
      # @return [Array<StandardError>] the collection of errors
      attr_reader errors: Array[StandardError]

      # Initialize a new AggregateError instance
      #
      # @param message [String] the main error message
      # @param errors [Array<StandardError>] the collection of errors to aggregate
      #
      # @return [AggregateError] the new AggregateError instance
      def initialize: (String message, Array[StandardError] errors) -> void
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
domainic-attributer-0.2.0 sig/domainic/attributer/errors/aggregate_error.rbs