34 #include <system_error> 41 #include "include_base_utils.h" 97 template<
typename Base>
104 std::ostringstream ss;
105 ss <<
m_loc <<
':' <<
typeid(*this).name() <<
": " << Base::what();
121 "failed to get blocks",
122 "failed to get hashes",
123 "failed to get out indices",
124 "failed to get random outs" 134 template<
typename Base,
int msg_index>
147 std::ostringstream ss;
148 ss << Base::to_string() <<
", status = " <<
status();
179 std::ostringstream ss;
200 :
wallet_runtime_error(
std::move(loc),
"This signature was made with stale data: export fresh multisig data, which other participants must then use")
208 :
wallet_runtime_error(
std::move(loc),
"Not enough multisig data was found to sign: import multisig data from more other participants")
215 explicit password_needed(std::string&& loc,
const std::string &msg =
"Password needed")
222 "file already exists",
224 "failed to read file",
225 "failed to save file" 235 template<
int msg_index>
244 explicit file_error_base(std::string&& loc,
const std::string&
file,
const std::error_code &e)
351 std::ostringstream ss;
446 std::ostringstream ss;
472 std::ostringstream ss;
500 std::ostringstream ss;
530 std::ostringstream ss;
546 typedef std::vector<cryptonote::tx_source_entry>
sources_t;
570 std::ostringstream ss;
573 for (
size_t i = 0; i <
m_sources.size(); ++i)
576 ss <<
"\n source " << i <<
":";
590 ss <<
"\nDestinations:";
626 std::ostringstream ss;
647 ,
const std::vector<cryptonote::tx_destination_entry>&
destinations 663 std::ostringstream ss;
694 std::ostringstream ss;
722 std::ostringstream ss;
808 #if !defined(_MSC_VER) 810 template<
typename TException,
typename... TArgs>
813 TException e(std::move(loc), args...);
814 LOG_PRINT_L0(e.to_string());
819 #include <boost/preprocessor/repetition/enum_binary_params.hpp> 820 #include <boost/preprocessor/repetition/enum_params.hpp> 821 #include <boost/preprocessor/repetition/repeat_from_to.hpp> 823 template<
typename TException>
826 TException e(std::move(loc));
827 LOG_PRINT_L0(e.to_string());
831 #define GEN_throw_wallet_ex(z, n, data) \ 832 template<typename TException, BOOST_PP_ENUM_PARAMS(n, typename TArg)> \ 833 void throw_wallet_ex(std::string&& loc, BOOST_PP_ENUM_BINARY_PARAMS(n, const TArg, &arg)) \ 835 TException e(std::move(loc), BOOST_PP_ENUM_PARAMS(n, arg)); \ 836 LOG_PRINT_L0(e.to_string()); \ 840 BOOST_PP_REPEAT_FROM_TO(1, 6, GEN_throw_wallet_ex, ~)
845 #define STRINGIZE_DETAIL(x) #x 846 #define STRINGIZE(x) STRINGIZE_DETAIL(x) 848 #define THROW_WALLET_EXCEPTION(err_type, ...) \ 850 LOG_ERROR("THROW EXCEPTION: " << #err_type); \ 851 tools::error::throw_wallet_ex<err_type>(std::string(__FILE__ ":" STRINGIZE(__LINE__)), ## __VA_ARGS__); \ 854 #define THROW_WALLET_EXCEPTION_IF(cond, err_type, ...) \ 857 LOG_ERROR(#cond << ". THROW EXCEPTION: " << #err_type); \ 858 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:159
Definition: blockchain_ancestry.cpp:70
uint64_t get_transaction_weight(const transaction &tx, size_t blob_size)
Definition: cryptonote_format_utils.cpp:349
uint64_t amount
Definition: cryptonote_tx_utils.h:51
Holds cryptonote related classes and helpers.
Definition: db_bdb.cpp:224
Definition: cryptonote_tx_utils.h:42
std::string obj_to_json_str(T &obj)
Definition: cryptonote_format_utils.h:176
uint64_t amount
Definition: cryptonote_tx_utils.h:76
bool is_subaddress
Definition: cryptonote_tx_utils.h:78
POD_CLASS public_key
Definition: crypto.h:63
account_public_address addr
Definition: cryptonote_tx_utils.h:77
std::string blobdata
Definition: blobdatatype.h:35
network_type
Definition: cryptonote_config.h:204
Definition: cryptonote_tx_utils.h:74
std::string print_money(uint64_t amount, unsigned int decimal_point)
Definition: cryptonote_format_utils.cpp:808
Definition: cryptonote_basic.h:182