Exception: Castkit::ContractError

Inherits:
Error
  • Object
show all
Defined in:
lib/castkit/error.rb

Overview

Raised during contract validation.

Instance Attribute Summary collapse

Attributes inherited from Error

#context

Instance Method Summary collapse

Constructor Details

#initialize(msg, context: nil, errors: nil) ⇒ ContractError

Returns a new instance of ContractError.



49
50
51
52
# File 'lib/castkit/error.rb', line 49

def initialize(msg, context: nil, errors: nil)
  super(msg, context: context)
  @errors = errors || {}
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



47
48
49
# File 'lib/castkit/error.rb', line 47

def errors
  @errors
end