Exception: PatternMatchingError

Inherits:
ContractBaseError show all
Defined in:
lib/contracts-ruby2/lib/contracts/errors.rb,
lib/contracts-ruby3/lib/contracts/errors.rb

Overview

Special contract error used internally to detect pattern failure during pattern matching

Instance Attribute Summary

Attributes inherited from ContractBaseError

#data

Instance Method Summary collapse

Methods inherited from ContractBaseError

#initialize

Constructor Details

This class inherits a constructor from ContractBaseError

Instance Method Details

#to_contract_errorObject

Used to convert to ContractError from PatternMatchingError



35
36
37
# File 'lib/contracts-ruby2/lib/contracts/errors.rb', line 35

def to_contract_error
  ContractError.new(to_s, data)
end