[Tarantool-patches] [PATCH V3 0/7] Extending error functionality

Leonid Vasiliev lvasiliev at tarantool.org
Wed Apr 15 12:31:55 MSK 2020


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

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
* Lua backtrace

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

Leonid Vasiliev (6):
  error: add a Lua traceback to error
  error: add custom error type
  error: send custom type in IProto
  error: add session setting for error type marshaling
  error: update constructors of some errors
  error: add error MsgPack encoding

Vladislav Shpilevoy (1):
  session: add offset to SQL session settings array

 extra/exports                        |   2 +
 src/box/CMakeLists.txt               |   1 +
 src/box/errcode.h                    |   1 +
 src/box/error.cc                     | 111 +++++---
 src/box/error.h                      |  42 +++-
 src/box/iproto_constants.h           |   1 +
 src/box/lua/call.c                   |  33 ++-
 src/box/lua/error.cc                 |  73 +++++-
 src/box/lua/execute.c                |   2 +-
 src/box/lua/init.c                   |  56 +++++
 src/box/lua/mp_error.cc              | 476 +++++++++++++++++++++++++++++++++++
 src/box/lua/mp_error.h               |  49 ++++
 src/box/lua/net_box.lua              |  14 +-
 src/box/lua/tuple.c                  |  28 +--
 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                       |  11 +-
 src/lib/core/diag.c                  |  16 ++
 src/lib/core/diag.h                  |  28 +++
 src/lib/core/exception.cc            |   1 +
 src/lib/core/mp_extension_types.h    |   1 +
 src/lua/error.c                      |  11 +-
 src/lua/error.h                      |   3 +-
 src/lua/error.lua                    |  21 +-
 src/lua/msgpack.c                    |  28 ++-
 src/lua/msgpack.h                    |   8 +-
 src/lua/utils.c                      |  13 +-
 src/lua/utils.h                      |   8 +-
 src/serializer_opts.h                |  44 ++++
 test/app/fiber.result                |   7 +-
 test/box-tap/extended_error.test.lua | 182 ++++++++++++++
 test/box/error.result                | 168 ++++++++++++-
 test/box/error.test.lua              |  66 +++++
 test/box/session_settings.result     |   3 +-
 test/engine/func_index.result        |  14 +-
 39 files changed, 1476 insertions(+), 135 deletions(-)
 create mode 100644 src/box/lua/mp_error.cc
 create mode 100644 src/box/lua/mp_error.h
 create mode 100644 src/serializer_opts.h
 create mode 100755 test/box-tap/extended_error.test.lua

-- 
2.7.4



More information about the Tarantool-patches mailing list