Exception: Tarantool::Crud::ManyError

Inherits:
Error
  • Object
show all
Defined in:
tarantool-crud/lib/tarantool/crud/errors.rb

Overview

Raised by *_many! when any row failed; result holds the rows that were written. An aggregate, not one crud function error, hence not a Crud::Error.

Instance Attribute Summary collapse

Attributes inherited from Error

#deleted

Instance Method Summary collapse

Constructor Details

#initialize(result) ⇒ ManyError

Returns a new instance of ManyError.



54
55
56
57
# File 'tarantool-crud/lib/tarantool/crud/errors.rb', line 54

def initialize(result)
  @result = result
  super("#{result.errors.size} crud operation(s) failed, first: #{result.errors.first.message}")
end

Instance Attribute Details

#result ⇒ Object (readonly)

Returns the value of attribute result.



52
53
54
# File 'tarantool-crud/lib/tarantool/crud/errors.rb', line 52

def result
  @result
end

Instance Method Details

#errors ⇒ Object



59
# File 'tarantool-crud/lib/tarantool/crud/errors.rb', line 59

def errors = result.errors