35 #include <system_error> 42 #include "include_base_utils.h" 99 template<
typename Base>
106 std::ostringstream ss;
107 ss <<
m_loc <<
':' <<
typeid(*this).name() <<
": " << Base::what();
123 "failed to get blocks",
124 "failed to get hashes",
125 "failed to get out indices",
126 "failed to get random outs" 136 template<
typename Base,
int msg_index>
149 std::ostringstream ss;
150 ss << Base::to_string() <<
", status = " <<
status();
181 std::ostringstream ss;
202 :
wallet_runtime_error(
std::move(loc),
"This signature was made with stale data: export fresh multisig data, which other participants must then use")
210 :
wallet_runtime_error(
std::move(loc),
"Not enough multisig data was found to sign: import multisig data from more other participants")
217 explicit password_needed(std::string&& loc,
const std::string &msg =
"Password needed")
232 "file already exists",
234 "failed to read file",
235 "failed to save file" 245 template<
int msg_index>
254 explicit file_error_base(std::string&& loc,
const std::string&
file,
const std::error_code &e)
361 std::ostringstream ss;
464 std::ostringstream ss;
490 std::ostringstream ss;
518 std::ostringstream ss;
548 std::ostringstream ss;
564 typedef std::vector<cryptonote::tx_source_entry>
sources_t;
588 std::ostringstream ss;
591 for (
size_t i = 0; i <
m_sources.size(); ++i)
594 ss <<
"\n source " << i <<
":";
608 ss <<
"\nDestinations:";
644 std::ostringstream ss;
665 ,
const std::vector<cryptonote::tx_destination_entry>&
destinations 681 std::ostringstream ss;
724 std::ostringstream ss;
757 std::ostringstream ss;
845 explicit mms_error(std::string&& loc,
const std::string& message)
854 :
mms_error(
std::move(loc),
"no connection to PyBitmessage at address " + address)
862 :
mms_error(
std::move(loc),
"PyBitmessage returned " + error_string)
868 #if !defined(_MSC_VER) 870 template<
typename TException,
typename... TArgs>
873 TException e(std::move(loc),
args...);
874 LOG_PRINT_L0(e.to_string());
879 #include <boost/preprocessor/repetition/enum_binary_params.hpp> 880 #include <boost/preprocessor/repetition/enum_params.hpp> 881 #include <boost/preprocessor/repetition/repeat_from_to.hpp> 883 template<
typename TException>
886 TException e(std::move(loc));
887 LOG_PRINT_L0(e.to_string());
891 #define GEN_throw_wallet_ex(z, n, data) \ 892 template<typename TException, BOOST_PP_ENUM_PARAMS(n, typename TArg)> \ 893 void throw_wallet_ex(std::string&& loc, BOOST_PP_ENUM_BINARY_PARAMS(n, const TArg, &arg)) \ 895 TException e(std::move(loc), BOOST_PP_ENUM_PARAMS(n, arg)); \ 896 LOG_PRINT_L0(e.to_string()); \ 900 BOOST_PP_REPEAT_FROM_TO(1, 6, GEN_throw_wallet_ex, ~)
905 #define STRINGIZE_DETAIL(x) #x 906 #define STRINGIZE(x) STRINGIZE_DETAIL(x) 908 #define THROW_WALLET_EXCEPTION(err_type, ...) \ 910 LOG_ERROR("THROW EXCEPTION: " << #err_type); \ 911 tools::error::throw_wallet_ex<err_type>(std::string(__FILE__ ":" STRINGIZE(__LINE__)), ## __VA_ARGS__); \ 914 #define THROW_WALLET_EXCEPTION_IF(cond, err_type, ...) \ 917 LOG_ERROR(#cond << ". THROW EXCEPTION: " << #err_type); \ 918 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:203
Definition: blockchain_ancestry.cpp:72
uint64_t get_transaction_weight(const transaction &tx, size_t blob_size)
Definition: cryptonote_format_utils.cpp:392
uint64_t amount
Definition: cryptonote_tx_utils.h:52
args
Definition: build_protob.py:10
Holds cryptonote related classes and helpers.
Definition: db_bdb.cpp:225
Definition: cryptonote_tx_utils.h:43
std::string obj_to_json_str(T &obj)
Definition: cryptonote_format_utils.h:197
Definition: wallet_errors.h:223
uint64_t amount
Definition: cryptonote_tx_utils.h:78
#define false
Definition: stdbool.h:38
bool is_subaddress
Definition: cryptonote_tx_utils.h:80
POD_CLASS public_key
Definition: crypto.h:76
account_public_address addr
Definition: cryptonote_tx_utils.h:79
std::string blobdata
Definition: blobdatatype.h:39
network_type
Definition: cryptonote_config.h:242
password_entry_failed(std::string &&loc, const std::string &msg="Password entry failed")
Definition: wallet_errors.h:225
Definition: cryptonote_tx_utils.h:75
std::string print_money(uint64_t amount, unsigned int decimal_point)
Definition: cryptonote_format_utils.cpp:940
error
Tracks LMDB error codes.
Definition: error.h:44
Definition: cryptonote_basic.h:204
#define true
Definition: stdbool.h:37