Tarantool development patches archive
 help / color / mirror / Atom feed
From: Leonid Vasiliev <lvasiliev@tarantool.org>
To: v.shpilevoy@tarantool.org
Cc: tarantool-patches@dev.tarantool.org
Subject: [Tarantool-patches] [PATCH v2 0/5] Extending error functionality
Date: Fri, 10 Apr 2020 11:10:38 +0300	[thread overview]
Message-ID: <cover.1586505741.git.lvasiliev@tarantool.org> (raw)

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 (5):
  error: Add a Lua backtrace to error
  error: Add the custom error type
  error: Increase the number of fields transmitted through IPROTO
  iproto: Add session settings for IPROTO
  iproto: Update error MsgPack encoding

 src/box/CMakeLists.txt               |   1 +
 src/box/errcode.h                    |   1 +
 src/box/error.cc                     |  87 ++++++-
 src/box/error.h                      |  49 +++-
 src/box/iproto.cc                    |  97 ++++++++
 src/box/iproto_constants.h           |   2 +
 src/box/lua/call.c                   |  29 ++-
 src/box/lua/error.cc                 | 189 ++++++++++++---
 src/box/lua/execute.c                |   2 +-
 src/box/lua/init.c                   |  56 +++++
 src/box/lua/mp_error.cc              | 454 +++++++++++++++++++++++++++++++++++
 src/box/lua/mp_error.h               |  49 ++++
 src/box/lua/net_box.lua              |  33 ++-
 src/box/lua/tuple.c                  |  28 +--
 src/box/session.cc                   |   3 +
 src/box/session.h                    |   3 +
 src/box/session_settings.h           |   1 +
 src/box/sql/func.c                   |   4 +-
 src/box/xrow.c                       |  19 +-
 src/lib/core/diag.c                  |  32 +++
 src/lib/core/diag.h                  |  11 +
 src/lib/core/exception.cc            |   1 +
 src/lib/core/mp_extension_types.h    |   5 +-
 src/lua/error.c                      |  12 +-
 src/lua/error.h                      |   3 +-
 src/lua/error.lua                    |  23 +-
 src/lua/msgpack.c                    |  28 ++-
 src/lua/msgpack.h                    |   8 +-
 src/lua/utils.c                      |  16 +-
 src/lua/utils.h                      |  26 +-
 test/app/fiber.result                |   4 +-
 test/box-tap/extended_error.test.lua | 164 +++++++++++++
 test/box/error.result                |   9 +-
 test/engine/func_index.result        |  18 +-
 34 files changed, 1344 insertions(+), 123 deletions(-)
 create mode 100644 src/box/lua/mp_error.cc
 create mode 100644 src/box/lua/mp_error.h
 create mode 100755 test/box-tap/extended_error.test.lua

-- 
2.7.4

             reply	other threads:[~2020-04-10  8:10 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-10  8:10 Leonid Vasiliev [this message]
2020-04-10  8:10 ` [Tarantool-patches] [PATCH v2 1/5] error: Add a Lua backtrace to error Leonid Vasiliev
2020-04-14  1:11   ` Vladislav Shpilevoy
2020-04-15  9:25     ` lvasiliev
2020-04-16  0:00       ` Vladislav Shpilevoy
2020-04-16  1:11         ` Alexander Turenko
2020-04-16  8:58           ` lvasiliev
2020-04-16  9:30             ` Alexander Turenko
2020-04-16 12:27               ` lvasiliev
2020-04-16 12:45                 ` Alexander Turenko
2020-04-16 17:48                   ` lvasiliev
2020-04-16  8:40         ` lvasiliev
2020-04-16  9:04           ` lvasiliev
2020-04-10  8:10 ` [Tarantool-patches] [PATCH v2 2/5] error: Add the custom error type Leonid Vasiliev
2020-04-14  1:11   ` Vladislav Shpilevoy
2020-04-15  9:25     ` lvasiliev
2020-04-16  0:02       ` Vladislav Shpilevoy
2020-04-16  9:18         ` lvasiliev
2020-04-16 21:03           ` Vladislav Shpilevoy
2020-04-10  8:10 ` [Tarantool-patches] [PATCH v2 3/5] error: Increase the number of fields transmitted through IPROTO Leonid Vasiliev
2020-04-14  1:12   ` Vladislav Shpilevoy
2020-04-15  9:25     ` lvasiliev
2020-04-16  0:02       ` Vladislav Shpilevoy
2020-04-10  8:10 ` [Tarantool-patches] [PATCH v2 4/5] iproto: Add session settings for IPROTO Leonid Vasiliev
2020-04-14  1:12   ` Vladislav Shpilevoy
2020-04-15  9:26     ` lvasiliev
2020-04-16  0:06       ` Vladislav Shpilevoy
2020-04-16  9:36         ` lvasiliev
2020-04-16 21:04           ` Vladislav Shpilevoy
2020-04-10  8:10 ` [Tarantool-patches] [PATCH v2 5/5] iproto: Update error MsgPack encoding Leonid Vasiliev
2020-04-14  1:12   ` Vladislav Shpilevoy
2020-04-15  9:25     ` lvasiliev
2020-04-16  0:11       ` Vladislav Shpilevoy
2020-04-16 10:04         ` lvasiliev
2020-04-16 21:06           ` Vladislav Shpilevoy
2020-04-14  1:10 ` [Tarantool-patches] [PATCH v2 0/5] Extending error functionality Vladislav Shpilevoy
2020-04-15  9:48   ` lvasiliev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1586505741.git.lvasiliev@tarantool.org \
    --to=lvasiliev@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v2 0/5] Extending error functionality' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox