Exception: Familia::SchemaValidationError

Inherits:
HorreumError show all
Defined in:
lib/familia/schema_registry.rb

Overview

Error raised when schema validation fails

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(errors) ⇒ SchemaValidationError

Returns a new instance of SchemaValidationError.



159
160
161
162
163
# File 'lib/familia/schema_registry.rb', line 159

def initialize(errors)
  @errors = errors
  messages = errors.map { |e| format_error(e) }.first(3)
  super("Schema validation failed: #{messages.join('; ')}")
end

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



157
158
159
# File 'lib/familia/schema_registry.rb', line 157

def errors
  @errors
end