Exception: Contract::ContractError

Inherits:
StandardError
  • Object
show all
Includes:
ContractException
Defined in:
lib/contract/exception.rb

Overview

Represents an unexpected failure while processing a contract test. This is more critical than ContractMismatch and usually means that something is wrong with the test itself.

Instance Attribute Summary collapse

Attributes included from ContractException

#original_message, #test_contract, #test_method, #test_object

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ ContractError

:nodoc:



53
54
55
56
# File 'lib/contract/exception.rb', line 53

def initialize(*args) # :nodoc:
  @type = args.pop
  ce_initialize(*args)
end

Instance Attribute Details

#typeObject (readonly)

The type of the original Exception that triggered the unexpected failure.



60
61
62
# File 'lib/contract/exception.rb', line 60

def type
  @type
end