35 #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;
182 std::ostringstream ss;
204 std::ostringstream ss;
225 :
wallet_runtime_error(std::
move(loc),
"This signature was made with stale data: export fresh multisig data, which other participants must then use")
233 :
wallet_runtime_error(std::
move(loc),
"Not enough multisig data was found to sign: import multisig data from more other participants")
255 "file already exists",
257 "failed to read file",
258 "failed to save file"
268 template<
int msg_index>
384 std::ostringstream ss;
400 , m_block_blob(block_data)
487 std::ostringstream ss;
513 std::ostringstream ss;
541 std::ostringstream ss;
571 std::ostringstream ss;
573 for (
const auto& out: m_scanty_outs)
582 size_t m_mixin_count;
587 typedef std::vector<cryptonote::tx_source_entry>
sources_t;
611 std::ostringstream ss;
614 for (
size_t i = 0; i < m_sources.size(); ++i)
617 ss <<
"\n source " << i <<
":";
631 ss <<
"\nDestinations:";
632 for (
size_t i = 0; i < m_destinations.size(); ++i)
639 ss <<
"\nunlock_time: " << m_unlock_time;
667 std::ostringstream ss;
671 if (!m_reason.empty())
673 ss <<
" (" << m_reason <<
")";
688 ,
const std::vector<cryptonote::tx_destination_entry>&
destinations
699 const std::vector<cryptonote::tx_destination_entry>&
destinations()
const {
return m_destinations; }
704 std::ostringstream ss;
708 for (
const auto& dst : m_destinations)
716 std::vector<cryptonote::tx_destination_entry> m_destinations;
747 std::ostringstream ss;
749 ", tx_weight_limit = " << m_tx_weight_limit <<
750 ", tx weight = " << m_tx_weight;
780 std::ostringstream ss;
885 :
mms_error(std::
move(loc),
"PyBitmessage returned " + error_string)
891 #if !defined(_MSC_VER)
893 template<
typename TException,
typename... TArgs>
902 #include <boost/preprocessor/repetition/enum_binary_params.hpp>
903 #include <boost/preprocessor/repetition/enum_params.hpp>
904 #include <boost/preprocessor/repetition/repeat_from_to.hpp>
906 template<
typename TException>
914 #define GEN_throw_wallet_ex(z, n, data) \
915 template<typename TException, BOOST_PP_ENUM_PARAMS(n, typename TArg)> \
916 void throw_wallet_ex(std::string&& loc, BOOST_PP_ENUM_BINARY_PARAMS(n, const TArg, &arg)) \
918 TException e(std::move(loc), BOOST_PP_ENUM_PARAMS(n, arg)); \
919 LOG_PRINT_L0(e.to_string()); \
923 BOOST_PP_REPEAT_FROM_TO(1, 6, GEN_throw_wallet_ex, ~)
928 #define STRINGIZE_DETAIL(x) #x
929 #define STRINGIZE(x) STRINGIZE_DETAIL(x)
931 #define THROW_WALLET_EXCEPTION(err_type, ...) \
933 LOG_ERROR("THROW EXCEPTION: " << #err_type); \
934 tools::error::throw_wallet_ex<err_type>(std::string(__FILE__ ":" STRINGIZE(__LINE__)), ## __VA_ARGS__); \
937 #define THROW_WALLET_EXCEPTION_IF(cond, err_type, ...) \
940 LOG_ERROR(#cond << ". THROW EXCEPTION: " << #err_type); \
941 tools::error::throw_wallet_ex<err_type>(std::string(__FILE__ ":" STRINGIZE(__LINE__)), ## __VA_ARGS__); \
std::string message("Message requiring signing")
Holds cryptonote related classes and helpers.
std::string obj_to_json_str(T &obj)
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)
std::string to_string(t_connection_type type)
error
Tracks LMDB error codes.
const T & move(const T &t)
unsigned __int64 uint64_t
account_public_address addr
password_entry_failed(std::string &&loc, const std::string &msg="Password entry failed")