Sha256: 1dc8a59661d1f9268e3bf9ad1a7a6306860b8cdb4dd8f850572f22d8f962f5d3

Contents?: true

Size: 1.04 KB

Versions: 1

Compression:

Stored size: 1.04 KB

Contents

# frozen_string_literal: true

require 'domainic/attributer/errors/aggregate_error'

module Domainic
  module Attributer
    # A specialized error class for validation execution failures
    #
    # This error class is used when one or more validations encounter errors during
    # their execution. It aggregates all validation-related errors into a single
    # error with a descriptive message listing each individual failure
    #
    # @author {https://aaronmallen.me Aaron Allen}
    # @since 0.2.0
    class ValidationExecutionError < AggregateError
      # Initialize a new ValidationExecutionError instance
      #
      # @api private
      # @!visibility private
      #
      # @param errors [Array<StandardError>] the collection of validation errors to aggregate
      #
      # @return [ValidationExecutionError] the new ValidationExecutionError instance
      # @rbs (Array[StandardError] errors) -> void
      def initialize(errors)
        super('The following errors occurred during validation execution:', errors)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
domainic-attributer-0.2.0 lib/domainic/attributer/errors/validation_execution_error.rb