Exception: NanoService::InvalidRecordError

Inherits:
Error
  • Object
show all
Defined in:
lib/nano-service/exceptions.rb

Direct Known Subclasses

RecordInvalid, RecordNotSaved

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil, errors = nil) ⇒ InvalidRecordError

Returns a new instance of InvalidRecordError.



8
9
10
11
# File 'lib/nano-service/exceptions.rb', line 8

def initialize(msg = nil, errors = nil)
  super(msg)
  @errors = ErrorSerializer.serialize(errors)
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



6
7
8
# File 'lib/nano-service/exceptions.rb', line 6

def errors
  @errors
end