34#include <system_error>
100 template<
typename Base>
107 std::ostringstream ss;
108 ss <<
m_loc <<
':' <<
typeid(*this).name() <<
": " << Base::what();
124 "failed to get blocks",
125 "failed to get hashes",
126 "failed to get out indices",
127 "failed to get random outs"
137 template<
typename Base,
int msg_index>
150 std::ostringstream ss;
151 ss << Base::to_string() <<
", status = " <<
status();
182 std::ostringstream ss;
203 :
wallet_runtime_error(
std::move(loc),
"This signature was made with stale data: export fresh multisig data, which other participants must then use")
211 :
wallet_runtime_error(
std::move(loc),
"Not enough multisig data was found to sign: import multisig data from more other participants")
218 explicit password_needed(std::string&& loc,
const std::string &msg =
"Password needed")
233 "file already exists",
235 "failed to read file",
236 "failed to save file"
246 template<
int msg_index>
255 explicit file_error_base(std::string&& loc,
const std::string&
file,
const std::error_code &e)
362 std::ostringstream ss;
485 std::ostringstream ss;
511 std::ostringstream ss;
539 std::ostringstream ss;
569 std::ostringstream ss;
585 typedef std::vector<cryptonote::tx_source_entry>
sources_t;
609 std::ostringstream ss;
612 for (
size_t i = 0; i <
m_sources.size(); ++i)
615 ss <<
"\n source " << i <<
":";
629 ss <<
"\nDestinations:";
665 std::ostringstream ss;
686 ,
const std::vector<cryptonote::tx_destination_entry>&
destinations
702 std::ostringstream ss;
745 std::ostringstream ss;
786 std::ostringstream ss;
896 explicit mms_error(std::string&& loc,
const std::string& message)
913 :
mms_error(
std::move(loc),
"PyBitmessage returned " + error_string)
919#if !defined(_MSC_VER)
921 template<
typename TException,
typename... TArgs>
924 TException e(std::move(loc), args...);
925 LOG_PRINT_L0(e.to_string());
930 #include <boost/preprocessor/repetition/enum_binary_params.hpp>
931 #include <boost/preprocessor/repetition/enum_params.hpp>
932 #include <boost/preprocessor/repetition/repeat_from_to.hpp>
934 template<
typename TException>
937 TException e(std::move(loc));
938 LOG_PRINT_L0(e.to_string());
942#define GEN_throw_wallet_ex(z, n, data) \
943 template<typename TException, BOOST_PP_ENUM_PARAMS(n, typename TArg)> \
944 void throw_wallet_ex(std::string&& loc, BOOST_PP_ENUM_BINARY_PARAMS(n, const TArg, &arg)) \
946 TException e(std::move(loc), BOOST_PP_ENUM_PARAMS(n, arg)); \
947 LOG_PRINT_L0(e.to_string()); \
951 BOOST_PP_REPEAT_FROM_TO(1, 6, GEN_throw_wallet_ex, ~)
956#define STRINGIZE_DETAIL(x) #x
957#define STRINGIZE(x) STRINGIZE_DETAIL(x)
959#define THROW_WALLET_EXCEPTION(err_type, ...) \
961 LOG_ERROR("THROW EXCEPTION: " << #err_type); \
962 tools::error::throw_wallet_ex<err_type>(std::string(__FILE__ ":" STRINGIZE(__LINE__)), ## __VA_ARGS__); \
965#define THROW_WALLET_EXCEPTION_IF(cond, err_type, ...) \
968 LOG_ERROR(#cond << ". THROW EXCEPTION: " << #err_type); \
969 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:205
network_type
Definition: cryptonote_config.h:289
std::string print_money(uint64_t amount, unsigned int decimal_point)
Definition: cryptonote_format_utils.cpp:1166
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
#define true
Definition: stdbool.h:36
#define false
Definition: stdbool.h:37
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
Definition: wallet_errors.h:225
password_entry_failed(std::string &&loc, const std::string &msg="Password entry failed")
Definition: wallet_errors.h:226