From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 41A5B6EC57; Mon, 26 Jul 2021 18:35:59 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 41A5B6EC57 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1627313759; bh=4IuwM1qNS/9rBat6kkZaaC37xzU8c90+yLnpQIFmXHM=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=g7jhnZkDG7kOQIJGaw4AbKGIbDcQZYFjOR+y4rxsw2yXSdEtL38nR7WF+O+z2k4Mu T0uMx+7PKF+JPjKWogRgdRB/QWvOFhv5dTlrsgi222UQkvzr3k1rUYA22BMlfD70YZ n+UPhP5ro/Ixw9p2Aa91zv/L1l7RHc1EILjjpW6Q= Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id DE8E36EC57 for ; Mon, 26 Jul 2021 18:35:19 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org DE8E36EC57 Received: by mail-lj1-f171.google.com with SMTP id n6so11756132ljp.9 for ; Mon, 26 Jul 2021 08:35:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xXLkpH45g9jZHteqRKPYNcx0VGTlTS5/2Sl6Z+PqFaA=; b=jCNCkIzN8hqs4TuODwi20pS4MhNqpYGg8W74NHpN7w0ZSpo/jxbJOJwpbali6pkf1r k7t81rQNwFOpoW8PVqSicDxEhhGkQrO4ViB2/sJW6Zf7xEhl0dN22gAYaawZFfkAHjZw FZtGqdDUClyOX9A/I36eTK/JTDUVM2qpznVbf74xWFt3YEtTOnt03FIvXZ2stfNAlXd8 nqmoZFlIb7trQh/daqsWNs82jftrl4NcZVcK3QpJDoPwml0uwmHI2IiHynDOWNq3J8Ga Vbgzy+PsMYPMoJLS2LabcicANQf4icMVnv+T8/2FCnJ5CUjBknYmK+37tMKX69HnjP/q iN6Q== X-Gm-Message-State: AOAM530Ppgsgwi8jES8/3aGM0ZXRYbRrSYUDFQqwONnA0QAyYdp4ekLw KcwiDJ05t30v3GJ2tWM8kF2vRtBYc2dBbg== X-Google-Smtp-Source: ABdhPJyUWWVMu1bn9MAMOHeh1xIOXo1NUW3DJljjqkNBuytZxX94aCc/lAlqEdZHztunnoaSWkXO7A== X-Received: by 2002:a05:651c:103c:: with SMTP id w28mr12970411ljm.139.1627313718965; Mon, 26 Jul 2021 08:35:18 -0700 (PDT) Received: from grain.localdomain ([5.18.255.97]) by smtp.gmail.com with ESMTPSA id 9sm30905lfz.235.2021.07.26.08.35.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 08:35:17 -0700 (PDT) Received: by grain.localdomain (Postfix, from userid 1000) id 2B3F65A0020; Mon, 26 Jul 2021 18:34:53 +0300 (MSK) To: tml Date: Mon, 26 Jul 2021 18:34:48 +0300 Message-Id: <20210726153452.113897-3-gorcunov@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210726153452.113897-1-gorcunov@gmail.com> References: <20210726153452.113897-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v8 2/6] say: introduce panic_on helper X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Cyrill Gorcunov via Tarantool-patches Reply-To: Cyrill Gorcunov Cc: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" In-scope-of #6036 Signed-off-by: Cyrill Gorcunov --- src/lib/core/say.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/core/say.h b/src/lib/core/say.h index e1fec8c60..4bb1645fd 100644 --- a/src/lib/core/say.h +++ b/src/lib/core/say.h @@ -348,6 +348,7 @@ CFORMAT(printf, 5, 6) extern sayfunc_t _say; #define panic_status(status, ...) ({ say(S_FATAL, NULL, __VA_ARGS__); exit(status); }) #define panic(...) panic_status(EXIT_FAILURE, __VA_ARGS__) +#define panic_on(cond, ...) if (cond) panic(__VA_ARGS__) #define panic_syserror(...) ({ say(S_FATAL, strerror(errno), __VA_ARGS__); exit(EXIT_FAILURE); }) enum { -- 2.31.1