Exception: JsonMessage::ValidationError

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

Overview

One or more field’s values didn’t match their schema

Instance Method Summary collapse

Constructor Details

#initialize(field_errs) ⇒ ValidationError

Returns a new instance of ValidationError.



19
20
21
# File 'lib/json_message.rb', line 19

def initialize(field_errs)
  @field_errs = field_errs
end

Instance Method Details

#to_sObject



23
24
25
26
# File 'lib/json_message.rb', line 23

def to_s
  err_strs = @field_errs.map{|f, e| "Field: #{f}, Error: #{e}"}
  err_strs.join(', ')
end