From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id D99FE212E6 for ; Wed, 16 May 2018 13:06:47 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UJYT5O6FBAS7 for ; Wed, 16 May 2018 13:06:47 -0400 (EDT) Received: from smtp41.i.mail.ru (smtp41.i.mail.ru [94.100.177.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 98AAA212E2 for ; Wed, 16 May 2018 13:06:47 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v3 1/4] error: introduce error rebulding API From: Vladislav Shpilevoy References: Message-ID: Date: Wed, 16 May 2018 20:06:44 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org Cc: kostja@tarantool.org The patch is removed. On 15/05/2018 22:54, Vladislav Shpilevoy wrote: > Some of modules are out of box library and returns their custom > or common errors like SocketError, IllegalParams erc. But when > the core code is used in the box library, some of errors must be > converted into another errors. For example, it would be useful to > be able to transform IllegalParams into ClientError. > > The patch introduces diag_reset, that takes new error type and > custom arguments depending on the type. An error, that must be > available for rebuilding must have Rebuild method, > that takes old error object, and custom arguments. > --- > src/box/error.cc | 27 +++++++++++++++++++++++++++ > src/box/error.h | 5 +++++ > src/diag.h | 9 +++++++++ > 3 files changed, 41 insertions(+) >