hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
result_try.hpp File Reference
#include "common/result.hpp"
Include dependency graph for result_try.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define IROHA_EXPECTED_ERROR_CHECK(...)
 
#define IROHA_EXPECTED_TRY_GET_VALUE(name, ...)
 

Macro Definition Documentation

◆ IROHA_EXPECTED_ERROR_CHECK

#define IROHA_EXPECTED_ERROR_CHECK (   ...)
Value:
if (auto _tmp_gen_var = (__VA_ARGS__); \
iroha::expected::hasError(_tmp_gen_var)) \
return _tmp_gen_var.assumeError()

Copyright Soramitsu Co., Ltd. All Rights Reserved. SPDX-License-Identifier: Apache-2.0

◆ IROHA_EXPECTED_TRY_GET_VALUE

#define IROHA_EXPECTED_TRY_GET_VALUE (   name,
  ... 
)
Value:
typename decltype(__VA_ARGS__)::ValueInnerType name; \
if (auto _tmp_gen_var = (__VA_ARGS__); \
iroha::expected::hasError(_tmp_gen_var)) \
return _tmp_gen_var.assumeError(); \
else \
name = std::move(_tmp_gen_var.assumeValue())