[Tarantool-patches] [PATCH 0/6] Extending error functionality

Leonid Vasiliev lvasiliev at tarantool.org
Tue Mar 24 15:45:58 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
* payload (not implemented in patch)


Leonid Vasiliev (6):
  error: Add a Lua backtrace to error
  error: Add the custom error type
  iproto: Add negotiation phase
  error: Add extended error transfer format
  error: Add test for extended error
  error: Transmit an error through IPROTO_OK as object

 src/box/errcode.h                    |   1 +
 src/box/error.cc                     |  56 +++++++++
 src/box/error.h                      |  32 ++++++
 src/box/execute.c                    |   1 +
 src/box/iproto.cc                    |  40 ++++++-
 src/box/iproto_constants.h           |  25 +++++
 src/box/lua/call.c                   |  29 +++--
 src/box/lua/error.cc                 | 126 +++++++++++++++++----
 src/box/lua/execute.c                |   2 +-
 src/box/lua/net_box.c                |  34 ++++++
 src/box/lua/net_box.lua              | 103 +++++++++++++++--
 src/box/lua/tuple.c                  |  12 +-
 src/box/session.cc                   |  16 +++
 src/box/session.h                    |  20 ++++
 src/box/sql/func.c                   |   4 +-
 src/box/xrow.c                       | 160 ++++++++++++++++++++++++++
 src/box/xrow.h                       |  48 +++++++-
 src/lib/core/diag.c                  |  20 ++++
 src/lib/core/diag.h                  |   5 +
 src/lib/core/exception.cc            |   1 +
 src/lib/core/mp_extension_types.h    |   4 +-
 src/lib/core/port.h                  |   4 +-
 src/lua/error.c                      |  45 +++++++-
 src/lua/error.h                      |   6 +-
 src/lua/error.lua                    |  65 ++++++++---
 src/lua/msgpack.c                    |  26 +++--
 src/lua/msgpack.h                    |   8 +-
 src/lua/utils.c                      |  28 ++++-
 src/lua/utils.h                      |  27 ++++-
 test/app/fiber.result                |  35 ++++--
 test/app/fiber.test.lua              |  11 +-
 test/box-tap/extended_error.test.lua | 212 +++++++++++++++++++++++++++++++++++
 test/box/misc.result                 |  51 +++++++--
 test/box/misc.test.lua               |  19 +++-
 34 files changed, 1161 insertions(+), 115 deletions(-)
 create mode 100755 test/box-tap/extended_error.test.lua

-- 
2.7.4



More information about the Tarantool-patches mailing list