[Tarantool-patches] [PATCH V6 00/10] Extending error functionality

Leonid Vasiliev lvasiliev at tarantool.org
Mon Apr 20 01:25:02 MSK 2020


https://github.com/tarantool/tarantool/issues/4398
https://github.com/tarantool/tarantool/tree/lvasiliev/gh-4398-expose-error-module-5

Changes from previous:
- traceback patch has been removed
- Vlad patches have been applied
- Update old tests and add new
- Make iproto errors reuse mp_error module

According to https://github.com/tarantool/tarantool/issues/4398
(and after some discussion) we would like box.error to have:
* Ability to create new error types
* Transparent marshalling through net.box

@Changelog
Added:
Posibility to create errors of a custom user type
Transparent marshalling error through net.box(gh-4398)

Leonid Vasiliev (5):
  error: add custom error type
  error: add session setting for error type marshaling
  error: update constructors of some errors
  error: add error MsgPack encoding
  error: fix iproto error stack overlapped by old error

Vladislav Shpilevoy (5):
  session: add offset to SQL session settings array
  box: move Lua MP_EXT decoder from tuple.c
  error: export error_unref() function
  error: make iproto errors reuse mp_error module
  iproto: rename IPROTO_ERROR and IPROTO_ERROR_STACK

 extra/exports                        |   3 +
 src/box/CMakeLists.txt               |   6 +-
 src/box/error.cc                     | 125 ++++++--
 src/box/error.h                      |  51 +++-
 src/box/iproto_constants.h           |   9 +-
 src/box/lua/call.c                   |  25 +-
 src/box/lua/error.cc                 |  42 ++-
 src/box/lua/execute.c                |   2 +-
 src/box/lua/init.c                   |  54 ++++
 src/box/lua/net_box.lua              | 103 +++++--
 src/box/lua/tuple.c                  |  28 +-
 src/box/mp_error.cc                  | 554 +++++++++++++++++++++++++++++++++++
 src/box/mp_error.h                   |  74 +++++
 src/box/session.cc                   |   5 +-
 src/box/session.h                    |   5 +-
 src/box/session_settings.c           |  56 ++++
 src/box/session_settings.h           |   1 +
 src/box/sql/build.c                  |  18 +-
 src/box/sql/func.c                   |   4 +-
 src/box/xrow.c                       |  81 +----
 src/lib/core/diag.c                  |  20 ++
 src/lib/core/diag.h                  |  21 +-
 src/lib/core/mp_extension_types.h    |   1 +
 src/lua/error.c                      |   2 +-
 src/lua/error.h                      |   1 +
 src/lua/error.lua                    |  14 +-
 src/lua/msgpack.c                    |  27 +-
 src/lua/msgpack.h                    |   8 +-
 src/lua/utils.c                      |  15 +-
 src/lua/utils.h                      |   7 +-
 src/serializer_opts.h                |  44 +++
 test/app/fiber.result                |   5 +-
 test/box-tap/extended_error.test.lua | 150 ++++++++++
 test/box/error.result                |  65 +++-
 test/box/error.test.lua              |  15 +
 test/box/iproto.result               |  43 +--
 test/box/iproto.test.lua             |  17 +-
 test/box/session_settings.result     |   3 +-
 test/engine/func_index.result        |  14 +-
 test/unit/CMakeLists.txt             |   2 +
 test/unit/mp_error.cc                | 473 ++++++++++++++++++++++++++++++
 test/unit/mp_error.result            |  44 +++
 test/unit/xrow.cc                    | 183 +-----------
 test/unit/xrow.result                |  27 +-
 44 files changed, 1933 insertions(+), 514 deletions(-)
 create mode 100644 src/box/mp_error.cc
 create mode 100644 src/box/mp_error.h
 create mode 100644 src/serializer_opts.h
 create mode 100755 test/box-tap/extended_error.test.lua
 create mode 100644 test/unit/mp_error.cc
 create mode 100644 test/unit/mp_error.result

-- 
2.7.4



More information about the Tarantool-patches mailing list