34#include <system_error>
108 template<
typename Base>
115 std::ostringstream ss;
116 ss <<
m_loc <<
':' <<
typeid(*this).name() <<
": " << Base::what();
132 "failed to get blocks",
133 "failed to get hashes",
134 "failed to get out indices",
135 "failed to get random outs"
145 template<
typename Base,
int msg_index>
158 std::ostringstream ss;
159 ss << Base::to_string() <<
", status = " <<
status();
190 std::ostringstream ss;
211 :
wallet_runtime_error(
std::move(loc),
"This signature was made with stale data: export fresh multisig data, which other participants must then use")
219 :
wallet_runtime_error(
std::move(loc),
"Not enough multisig data was found to sign: import multisig data from more other participants")
226 explicit password_needed(std::string&& loc,
const std::string &msg =
"Password needed")
241 "file already exists",
243 "failed to read file",
244 "failed to save file"
254 template<
int msg_index>
263 explicit file_error_base(std::string&& loc,
const std::string&
file,
const std::error_code &e)
380 std::ostringstream ss;
503 std::ostringstream ss;
529 std::ostringstream ss;
557 std::ostringstream ss;
587 std::ostringstream ss;
603 typedef std::vector<cryptonote::tx_source_entry>
sources_t;
624 std::ostringstream ss;
627 for (
size_t i = 0; i <
m_sources.size(); ++i)
630 ss <<
"\n source " << i <<
":";
644 ss <<
"\nDestinations:";
677 std::ostringstream ss;
698 ,
const std::vector<cryptonote::tx_destination_entry>&
destinations
714 std::ostringstream ss;
757 std::ostringstream ss;
796 "subtractfeefrom: bad index: " +
std::
to_string(bad_index) +
" (indexes are 0-based)")
815 std::ostringstream ss;
925 explicit mms_error(std::string&& loc,
const std::string& message)
942 :
mms_error(
std::move(loc),
"PyBitmessage returned " + error_string)
959 :
scan_tx_error(
std::move(loc),
"The wallet has already seen 1 or more recent transactions than the scanned tx")
976 :
background_sync_error(
std::move(loc),
"background wallet " + background_wallet_file +
" is already opened by another wallet program")
990#if !defined(_MSC_VER)
992 template<
typename TException,
typename... TArgs>
995 TException e(std::move(loc), args...);
996 LOG_PRINT_L0(e.to_string());
1001 #include <boost/preprocessor/repetition/enum_binary_params.hpp>
1002 #include <boost/preprocessor/repetition/enum_params.hpp>
1003 #include <boost/preprocessor/repetition/repeat_from_to.hpp>
1005 template<
typename TException>
1008 TException e(std::move(loc));
1009 LOG_PRINT_L0(e.to_string());
1013#define GEN_throw_wallet_ex(z, n, data) \
1014 template<typename TException, BOOST_PP_ENUM_PARAMS(n, typename TArg)> \
1015 void throw_wallet_ex(std::string&& loc, BOOST_PP_ENUM_BINARY_PARAMS(n, const TArg, &arg)) \
1017 TException e(std::move(loc), BOOST_PP_ENUM_PARAMS(n, arg)); \
1018 LOG_PRINT_L0(e.to_string()); \
1022 BOOST_PP_REPEAT_FROM_TO(1, 6, GEN_throw_wallet_ex, ~)
1027#define STRINGIZE_DETAIL(x) #x
1028#define STRINGIZE(x) STRINGIZE_DETAIL(x)
1030#define THROW_WALLET_EXCEPTION(err_type, ...) \
1032 LOG_ERROR("THROW EXCEPTION: " << #err_type); \
1033 tools::error::throw_wallet_ex<err_type>(std::string(__FILE__ ":" STRINGIZE(__LINE__)), ## __VA_ARGS__); \
1036#define THROW_WALLET_EXCEPTION_IF(cond, err_type, ...) \
1039 LOG_ERROR(#cond << ". THROW EXCEPTION: " << #err_type); \
1040 tools::error::throw_wallet_ex<err_type>(std::string(__FILE__ ":" STRINGIZE(__LINE__)), ## __VA_ARGS__); \
Definition cryptonote_basic.h:205
uint32_t address
Definition getifaddr.c:269
POD_CLASS public_key
Definition crypto.h:64
Holds cryptonote related classes and helpers.
Definition blockchain_db.cpp:45
std::string obj_to_json_str(T &obj)
Definition cryptonote_format_utils.h:206
network_type
Definition cryptonote_config.h:302
std::string print_money(uint64_t amount, unsigned int decimal_point)
Definition cryptonote_format_utils.cpp:1180
std::string get_account_address_as_str(network_type nettype, bool subaddress, account_public_address const &adr)
Definition cryptonote_basic_impl.cpp:150
std::string blobdata
Definition blobdatatype.h:39
Definition get_output_distribution.py:1
unsigned __int64 uint64_t
Definition stdint.h:136
Definition cryptonote_tx_utils.h:75
bool is_subaddress
Definition cryptonote_tx_utils.h:79
uint64_t amount
Definition cryptonote_tx_utils.h:77
account_public_address addr
Definition cryptonote_tx_utils.h:78
Definition cryptonote_tx_utils.h:43
uint64_t amount
Definition cryptonote_tx_utils.h:51
password_entry_failed(std::string &&loc, const std::string &msg="Password entry failed")
Definition wallet_errors.h:234