Sha256: 12e1522be3903ed7bb1b2ebf3e6a6a34095d566cd2a9242e3f13f7610bdcabea

Contents?: true

Size: 797 Bytes

Versions: 32

Compression:

Stored size: 797 Bytes

Contents

# frozen_string_literal: true

module Puppet::Pops::Types
  # Raised when an assertion of actual type against an expected type fails.
  #
  class TypeAssertionError < Puppet::Error
    # Returns the expected type
    # @return [PAnyType] expected type
    attr_reader :expected_type

    # Returns the actual type
    # @return [PAnyType] actual type
    attr_reader :actual_type

    # Creates a new instance with a default message, expected, and actual types,
    #
    # @param message [String] The default message
    # @param expected_type [PAnyType] The expected type
    # @param actual_type [PAnyType] The actual type
    #
    def initialize(message, expected_type, actual_type)
      super(message)
      @expected_type = expected_type
      @actual_type = actual_type
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
puppet-8.10.0 lib/puppet/pops/types/type_assertion_error.rb
puppet-8.10.0-x86-mingw32 lib/puppet/pops/types/type_assertion_error.rb
puppet-8.10.0-x64-mingw32 lib/puppet/pops/types/type_assertion_error.rb
puppet-8.10.0-universal-darwin lib/puppet/pops/types/type_assertion_error.rb
puppet-8.9.0 lib/puppet/pops/types/type_assertion_error.rb
puppet-8.9.0-x86-mingw32 lib/puppet/pops/types/type_assertion_error.rb
puppet-8.9.0-x64-mingw32 lib/puppet/pops/types/type_assertion_error.rb
puppet-8.9.0-universal-darwin lib/puppet/pops/types/type_assertion_error.rb
puppet-8.8.1 lib/puppet/pops/types/type_assertion_error.rb
puppet-8.8.1-x86-mingw32 lib/puppet/pops/types/type_assertion_error.rb
puppet-8.8.1-x64-mingw32 lib/puppet/pops/types/type_assertion_error.rb
puppet-8.8.1-universal-darwin lib/puppet/pops/types/type_assertion_error.rb
puppet-8.7.0 lib/puppet/pops/types/type_assertion_error.rb
puppet-8.7.0-x86-mingw32 lib/puppet/pops/types/type_assertion_error.rb
puppet-8.7.0-x64-mingw32 lib/puppet/pops/types/type_assertion_error.rb
puppet-8.7.0-universal-darwin lib/puppet/pops/types/type_assertion_error.rb
puppet-8.6.0 lib/puppet/pops/types/type_assertion_error.rb
puppet-8.6.0-x86-mingw32 lib/puppet/pops/types/type_assertion_error.rb
puppet-8.6.0-x64-mingw32 lib/puppet/pops/types/type_assertion_error.rb
puppet-8.6.0-universal-darwin lib/puppet/pops/types/type_assertion_error.rb