box/lua: implement inheritance of error payload fields
Suppose an error has a cause with some payload fields, for example: local e1 = box.error.new{'e1', foo = 'bar'} -- cause local e2 = box.error.new{'e2', prev = e1} -- effect Now it is possible to access cause payload fields via e2 directly: e2.foo -- 'bar' While looking for a payload field with a given name, we always stop at the topmost (closest to the effect) field. If there's a field with the same name deeper in the stack it is masked. Closes #9106 @TarantoolBot document Title: Document inheritance of error payload fields Product: Tarantool Since: 3.1 Root document: https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_error/error_object/ [Link to the design document](https://www.notion.so/tarantool/Error-subsystem-improvements-90faa0a4714b4143abaf8bed2c10b2fc?pvs=4#c080fe2ac28b46c8b0eda7234a8852ce)
Showing
- changelogs/unreleased/gh-9106-error-payload-inheritance.md 4 additions, 0 deletionschangelogs/unreleased/gh-9106-error-payload-inheritance.md
- src/lua/error.lua 8 additions, 3 deletionssrc/lua/error.lua
- test/box-luatest/error_subsystem_improvements_test.lua 11 additions, 0 deletionstest/box-luatest/error_subsystem_improvements_test.lua
Please register or sign in to comment