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 449866EC57; Fri, 30 Jul 2021 14:36:45 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 449866EC57 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1627645005; 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=Bc+23h/mD6+VI9TW1uPnzI28UTc8k6SZ5C+D9jkzMTCcHL4aXG+EuJRkRACdmWGWR ldh6WX55BBiPjUap1HRXpXjNS/jtMEGL/uQO29eM9xT1ak76zhwkCzNwnmK9sDCXtV NWrYUuF29/uCpb+fg0I8sE1kcM3nMJMx41pe+yC0= Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) (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 144756EC57 for ; Fri, 30 Jul 2021 14:36:07 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 144756EC57 Received: by mail-lf1-f43.google.com with SMTP id h14so17280945lfv.7 for ; Fri, 30 Jul 2021 04:36:07 -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=A5AKMHv4z4Ys6B4rzB3Pa4XfBvioMPexrx7KYog457uZ2DpUPkWjVQktrT5A/zAf8G GqNKaL9C1a0fkiLIlpeAa47tFOgia8B6s7hMsVISdVAGMzcmcJ1o3K0M3m7OrpOFmRRF XdFaJ3UKvctz8OnTRnJbbN7lQAGQNtUPT0h0z3Q74S43aKMY4H6SpDl4GJeY1WmytxzM kmTqp6AlSBgDF71Qp6EtKZ8S10vmX4Dm5FK0U+zaqXpMboSyiOE79hiUtSUZb8bAMmdZ TSpq6KrAS3JXQJG7U9xTzJZbK9ZSyMsQbt6g1CKNv5n9E4FTPuP6zMm/1XW1+JchBy4a 91OA== X-Gm-Message-State: AOAM532IRSigtPzNdhVVmLzTer7RS8hcd3ntOyZfQC82DAAnNaXNXw5u l3h8EWI9T8V+WvszTz/b3LK8gl+A7sx7qw== X-Google-Smtp-Source: ABdhPJyYsmDPILIBZD+Q/NVGtmzP/HvZUX7Go5bZjZt1N30wNX6vKTen5ioazgUzRTwbbazUUa1cNg== X-Received: by 2002:a19:c3c1:: with SMTP id t184mr1543171lff.41.1627644966218; Fri, 30 Jul 2021 04:36:06 -0700 (PDT) Received: from grain.localdomain ([5.18.255.97]) by smtp.gmail.com with ESMTPSA id q14sm80286ljj.68.2021.07.30.04.36.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jul 2021 04:36:05 -0700 (PDT) Received: by grain.localdomain (Postfix, from userid 1000) id 3614A5A0020; Fri, 30 Jul 2021 14:35:41 +0300 (MSK) To: tml Date: Fri, 30 Jul 2021 14:35:36 +0300 Message-Id: <20210730113539.563318-3-gorcunov@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210730113539.563318-1-gorcunov@gmail.com> References: <20210730113539.563318-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v9 2/5] 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