Exception: Tarantool::Crud::ManyError
- 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
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Attributes inherited from Error
Instance Method Summary collapse
- #errors ⇒ Object
-
#initialize(result) ⇒ ManyError
constructor
A new instance of ManyError.
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.}") 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 |