34 #include <system_error> 103 template<
typename Base>
110 std::ostringstream ss;
111 ss <<
m_loc <<
':' <<
typeid(*this).name() <<
": " << Base::what();
127 "failed to get blocks",
128 "failed to get hashes",
129 "failed to get out indices",
130 "failed to get random outs" 140 template<
typename Base,
int msg_index>
153 std::ostringstream ss;
185 std::ostringstream ss;
206 :
wallet_runtime_error(
std::
move(loc),
"This signature was made with stale data: export fresh multisig data, which other participants must then use")
214 :
wallet_runtime_error(
std::
move(loc),
"Not enough multisig data was found to sign: import multisig data from more other participants")
236 "file already exists",
238 "failed to read file",
239 "failed to save file" 249 template<
int msg_index>
365 std::ostringstream ss;
488 std::ostringstream ss;
514 std::ostringstream ss;
542 std::ostringstream ss;
572 std::ostringstream ss;
588 typedef std::vector<cryptonote::tx_source_entry>
sources_t;
612 std::ostringstream ss;
618 ss <<
"\n source " <<
i <<
":";
632 ss <<
"\nDestinations:";
668 std::ostringstream ss;
689 ,
const std::vector<cryptonote::tx_destination_entry>&
destinations 705 std::ostringstream ss;
748 std::ostringstream ss;
787 "subtractfeefrom: bad index: " +
std::
to_string(bad_index) +
" (indexes are 0-based)")
798 std::ostringstream ss;
942 :
scan_tx_error(
std::
move(loc),
"The wallet has already seen 1 or more recent transactions than the scanned tx")
948 #if !defined(_MSC_VER) 950 template<
typename TException,
typename... TArgs>
954 LOG_PRINT_L0(
e.to_string());
959 #include <boost/preprocessor/repetition/enum_binary_params.hpp> 960 #include <boost/preprocessor/repetition/enum_params.hpp> 961 #include <boost/preprocessor/repetition/repeat_from_to.hpp> 963 template<
typename TException>
967 LOG_PRINT_L0(
e.to_string());
971 #define GEN_throw_wallet_ex(z, n, data) \ 972 template<typename TException, BOOST_PP_ENUM_PARAMS(n, typename TArg)> \ 973 void throw_wallet_ex(std::string&& loc, BOOST_PP_ENUM_BINARY_PARAMS(n, const TArg, &arg)) \ 975 TException e(std::move(loc), BOOST_PP_ENUM_PARAMS(n, arg)); \ 976 LOG_PRINT_L0(e.to_string()); \ 980 BOOST_PP_REPEAT_FROM_TO(1, 6, GEN_throw_wallet_ex, ~)
985 #define STRINGIZE_DETAIL(x) #x 986 #define STRINGIZE(x) STRINGIZE_DETAIL(x) 988 #define THROW_WALLET_EXCEPTION(err_type, ...) \ 990 LOG_ERROR("THROW EXCEPTION: " << #err_type); \ 991 tools::error::throw_wallet_ex<err_type>(std::string(__FILE__ ":" STRINGIZE(__LINE__)), ## __VA_ARGS__); \ 994 #define THROW_WALLET_EXCEPTION_IF(cond, err_type, ...) \ 997 LOG_ERROR(#cond << ". THROW EXCEPTION: " << #err_type); \ 998 tools::error::throw_wallet_ex<err_type>(std::string(__FILE__ ":" STRINGIZE(__LINE__)), ## __VA_ARGS__); \
std::string get_account_address_as_str(network_type nettype, bool subaddress, account_public_address const &adr)
Definition: cryptonote_basic_impl.cpp:150
int i
Definition: pymoduletest.py:23
::std::string string
Definition: gtest-port.h:1097
uint64_t get_transaction_weight(const transaction &tx, size_t blob_size)
Definition: cryptonote_format_utils.cpp:444
uint64_t amount
Definition: cryptonote_tx_utils.h:51
args
Definition: build_protob.py:10
Holds cryptonote related classes and helpers.
Definition: blockchain_db.cpp:44
e
Definition: pymoduletest.py:79
Definition: cryptonote_tx_utils.h:42
std::string obj_to_json_str(T &obj)
Definition: cryptonote_format_utils.h:205
unsigned __int64 uint64_t
Definition: stdint.h:136
Definition: wallet_errors.h:227
uint64_t amount
Definition: cryptonote_tx_utils.h:77
#define false
Definition: stdbool.h:37
bool is_subaddress
Definition: cryptonote_tx_utils.h:79
POD_CLASS public_key
Definition: crypto.h:61
account_public_address addr
Definition: cryptonote_tx_utils.h:78
std::string blobdata
Definition: blobdatatype.h:39
Definition: get_output_distribution.py:1
network_type
Definition: cryptonote_config.h:295
uint32_t address
Definition: getifaddr.c:269
const T & move(const T &t)
Definition: gtest-port.h:1317
password_entry_failed(std::string &&loc, const std::string &msg="Password entry failed")
Definition: wallet_errors.h:229
Definition: cryptonote_tx_utils.h:74
std::string to_string(t_connection_type type)
Definition: connection_basic.cpp:76
std::string print_money(uint64_t amount, unsigned int decimal_point)
Definition: cryptonote_format_utils.cpp:1166
error
Tracks LMDB error codes.
Definition: error.h:44
tuple message
Definition: gtest_output_test.py:331
Definition: cryptonote_basic.h:204
#define true
Definition: stdbool.h:36