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.



180
181
182
183
184
# File 'lib/familia/schema_registry.rb', line 180

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

Instance Attribute Details

#errors ⇒ Object (readonly)

Returns the value of attribute errors.



178
179
180
# File 'lib/familia/schema_registry.rb', line 178

def errors
  @errors
end