aboutsummaryrefslogtreecommitdiff
path: root/tests/core_tests/chaingen.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-03-19 21:48:36 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2016-03-19 21:48:36 +0000
commitfff238ec94ac6d45fc18c315d7bc590ddfaad63d (patch)
treed138554a5a13e650f45f3d8d4b8bd0c9c1748235 /tests/core_tests/chaingen.cpp
parentMerge pull request #732 (diff)
downloadmonero-fff238ec94ac6d45fc18c315d7bc590ddfaad63d.tar.xz
Print stack trace upon exceptions
Useful for debugging users' logs
Diffstat (limited to 'tests/core_tests/chaingen.cpp')
-rw-r--r--tests/core_tests/chaingen.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/core_tests/chaingen.cpp b/tests/core_tests/chaingen.cpp
index 4fdd0a600..b897d9237 100644
--- a/tests/core_tests/chaingen.cpp
+++ b/tests/core_tests/chaingen.cpp
@@ -58,7 +58,7 @@ void test_generator::get_block_chain(std::vector<block_info>& blockchain, const
auto it = m_blocks_info.find(curr);
if (m_blocks_info.end() == it)
{
- throw std::runtime_error("block hash wasn't found");
+ throw tools::runtime_error("block hash wasn't found");
}
blockchain.push_back(it->second);
@@ -82,7 +82,7 @@ uint64_t test_generator::get_already_generated_coins(const crypto::hash& blk_id)
{
auto it = m_blocks_info.find(blk_id);
if (it == m_blocks_info.end())
- throw std::runtime_error("block hash wasn't found");
+ throw tools::runtime_error("block hash wasn't found");
return it->second.already_generated_coins;
}
@@ -323,7 +323,7 @@ bool init_output_indices(map_output_idx_t& outs, std::map<uint64_t, std::vector<
BOOST_FOREACH(const crypto::hash &h, blk.tx_hashes) {
const map_hash2tx_t::const_iterator cit = mtx.find(h);
if (mtx.end() == cit)
- throw std::runtime_error("block contains an unknown tx hash");
+ throw tools::runtime_error("block contains an unknown tx hash");
vtx.push_back(cit->second);
}
@@ -486,11 +486,11 @@ void fill_tx_sources_and_destinations(const std::vector<test_event_entry>& event
destinations.clear();
if (!fill_tx_sources(sources, events, blk_head, from, amount + fee, nmix))
- throw std::runtime_error("couldn't fill transaction sources");
+ throw tools::runtime_error("couldn't fill transaction sources");
tx_destination_entry de;
if (!fill_tx_destination(de, to, amount))
- throw std::runtime_error("couldn't fill transaction destination");
+ throw tools::runtime_error("couldn't fill transaction destination");
destinations.push_back(de);
tx_destination_entry de_change;
@@ -498,7 +498,7 @@ void fill_tx_sources_and_destinations(const std::vector<test_event_entry>& event
if (0 < cache_back)
{
if (!fill_tx_destination(de_change, from, cache_back))
- throw std::runtime_error("couldn't fill transaction cache back destination");
+ throw tools::runtime_error("couldn't fill transaction cache back destination");
destinations.push_back(de_change);
}
}