35 #include <system_error> 101 template<
typename Base>
108 std::ostringstream ss;
109 ss << m_loc <<
':' <<
typeid(*this).name() <<
": " << Base::what();
125 "failed to get blocks",
126 "failed to get hashes",
127 "failed to get out indices",
128 "failed to get random outs" 138 template<
typename Base,
int msg_index>
151 std::ostringstream ss;
183 std::ostringstream ss;
205 std::ostringstream ss;
226 :
wallet_runtime_error(
std::
move(loc),
"This signature was made with stale data: export fresh multisig data, which other participants must then use")
234 :
wallet_runtime_error(
std::
move(loc),
"Not enough multisig data was found to sign: import multisig data from more other participants")
256 "file already exists",
258 "failed to read file",
259 "failed to save file" 269 template<
int msg_index>
385 std::ostringstream ss;
401 , m_block_blob(block_data)
488 std::ostringstream ss;
514 std::ostringstream ss;
542 std::ostringstream ss;
572 std::ostringstream ss;
574 for (
const auto& out: m_scanty_outs)
583 size_t m_mixin_count;
588 typedef std::vector<cryptonote::tx_source_entry>
sources_t;
612 std::ostringstream ss;
615 for (
size_t i = 0; i < m_sources.size(); ++i)
618 ss <<
"\n source " << i <<
":";
632 ss <<
"\nDestinations:";
633 for (
size_t i = 0; i < m_destinations.size(); ++i)
640 ss <<
"\nunlock_time: " << m_unlock_time;
668 std::ostringstream ss;
672 if (!m_reason.empty())
674 ss <<
" (" << m_reason <<
")";
689 ,
const std::vector<cryptonote::tx_destination_entry>&
destinations 700 const std::vector<cryptonote::tx_destination_entry>&
destinations()
const {
return m_destinations; }
705 std::ostringstream ss;
709 for (
const auto& dst : m_destinations)
717 std::vector<cryptonote::tx_destination_entry> m_destinations;
748 std::ostringstream ss;
750 ", tx_weight_limit = " << m_tx_weight_limit <<
751 ", tx weight = " << m_tx_weight;
781 std::ostringstream ss;
900 #if !defined(_MSC_VER) 902 template<
typename TException,
typename... TArgs>
911 #include <boost/preprocessor/repetition/enum_binary_params.hpp> 912 #include <boost/preprocessor/repetition/enum_params.hpp> 913 #include <boost/preprocessor/repetition/repeat_from_to.hpp> 915 template<
typename TException>
923 #define GEN_throw_wallet_ex(z, n, data) \ 924 template<typename TException, BOOST_PP_ENUM_PARAMS(n, typename TArg)> \ 925 void throw_wallet_ex(std::string&& loc, BOOST_PP_ENUM_BINARY_PARAMS(n, const TArg, &arg)) \ 927 TException e(std::move(loc), BOOST_PP_ENUM_PARAMS(n, arg)); \ 928 LOG_PRINT_L0(e.to_string()); \ 932 BOOST_PP_REPEAT_FROM_TO(1, 6, GEN_throw_wallet_ex, ~)
937 #define STRINGIZE_DETAIL(x) #x 938 #define STRINGIZE(x) STRINGIZE_DETAIL(x) 940 #define THROW_WALLET_EXCEPTION(err_type, ...) \ 942 LOG_ERROR("THROW EXCEPTION: " << #err_type); \ 943 tools::error::throw_wallet_ex<err_type>(std::string(__FILE__ ":" STRINGIZE(__LINE__)), ## __VA_ARGS__); \ 946 #define THROW_WALLET_EXCEPTION_IF(cond, err_type, ...) \ 949 LOG_ERROR(#cond << ". THROW EXCEPTION: " << #err_type); \ 950 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)
std::string print_etn(uint64_t amount, unsigned int decimal_point)
uint64_t get_transaction_weight(const transaction &tx, size_t blob_size)
Holds cryptonote related classes and helpers.
std::string obj_to_json_str(T &obj)
unsigned __int64 uint64_t
std::string message("Message requiring signing")
account_public_address addr
const T & move(const T &t)
password_entry_failed(std::string &&loc, const std::string &msg="Password entry failed")
std::string to_string(t_connection_type type)
error
Tracks LMDB error codes.