diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-03-19 21:48:36 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-03-19 21:48:36 +0000 |
commit | fff238ec94ac6d45fc18c315d7bc590ddfaad63d (patch) | |
tree | d138554a5a13e650f45f3d8d4b8bd0c9c1748235 /tests/unit_tests | |
parent | Merge pull request #732 (diff) | |
download | monero-fff238ec94ac6d45fc18c315d7bc590ddfaad63d.tar.xz |
Print stack trace upon exceptions
Useful for debugging users' logs
Diffstat (limited to '')
-rw-r--r-- | tests/unit_tests/ban.cpp | 2 | ||||
-rw-r--r-- | tests/unit_tests/epee_boosted_tcp_server.cpp | 2 | ||||
-rw-r--r-- | tests/unit_tests/mnemonics.cpp | 1 | ||||
-rw-r--r-- | tests/unit_tests/test_protocol_pack.cpp | 1 |
4 files changed, 4 insertions, 2 deletions
diff --git a/tests/unit_tests/ban.cpp b/tests/unit_tests/ban.cpp index a5ce244d9..5d40e90cf 100644 --- a/tests/unit_tests/ban.cpp +++ b/tests/unit_tests/ban.cpp @@ -56,7 +56,7 @@ public: bool on_idle(){return true;} bool find_blockchain_supplement(const std::list<crypto::hash>& qblock_ids, cryptonote::NOTIFY_RESPONSE_CHAIN_ENTRY::request& resp){return true;} bool handle_get_objects(cryptonote::NOTIFY_REQUEST_GET_OBJECTS::request& arg, cryptonote::NOTIFY_RESPONSE_GET_OBJECTS::request& rsp, cryptonote::cryptonote_connection_context& context){return true;} - cryptonote::blockchain_storage &get_blockchain_storage() { throw std::runtime_error("Called invalid member function: please never call get_blockchain_storage on the TESTING class test_core."); } + cryptonote::blockchain_storage &get_blockchain_storage() { throw tools::runtime_error("Called invalid member function: please never call get_blockchain_storage on the TESTING class test_core."); } bool get_test_drop_download() const {return true;} bool get_test_drop_download_height() const {return true;} bool prepare_handle_incoming_blocks(const std::list<cryptonote::block_complete_entry> &blocks) { return true; } diff --git a/tests/unit_tests/epee_boosted_tcp_server.cpp b/tests/unit_tests/epee_boosted_tcp_server.cpp index 946db292d..b68ce77bb 100644 --- a/tests/unit_tests/epee_boosted_tcp_server.cpp +++ b/tests/unit_tests/epee_boosted_tcp_server.cpp @@ -104,7 +104,7 @@ TEST(boosted_tcp_server, worker_threads_are_exception_resistant) // 2 theads, but 4 exceptions ASSERT_TRUE(srv.run_server(2, false)); - ASSERT_TRUE(srv.async_call([&counter_incrementer]() { counter_incrementer(); throw std::runtime_error("test 1"); })); + ASSERT_TRUE(srv.async_call([&counter_incrementer]() { counter_incrementer(); throw tools::runtime_error("test 1"); })); ASSERT_TRUE(srv.async_call([&counter_incrementer]() { counter_incrementer(); throw std::string("test 2"); })); ASSERT_TRUE(srv.async_call([&counter_incrementer]() { counter_incrementer(); throw "test 3"; })); ASSERT_TRUE(srv.async_call([&counter_incrementer]() { counter_incrementer(); throw 4; })); diff --git a/tests/unit_tests/mnemonics.cpp b/tests/unit_tests/mnemonics.cpp index 3dc5db7d4..3bf1df7ed 100644 --- a/tests/unit_tests/mnemonics.cpp +++ b/tests/unit_tests/mnemonics.cpp @@ -27,6 +27,7 @@ // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "gtest/gtest.h" +#include "common/exception.h" #include "mnemonics/electrum-words.h" #include "crypto/crypto.h" #include <stdlib.h> diff --git a/tests/unit_tests/test_protocol_pack.cpp b/tests/unit_tests/test_protocol_pack.cpp index a9a1a34a6..1ff70b4d9 100644 --- a/tests/unit_tests/test_protocol_pack.cpp +++ b/tests/unit_tests/test_protocol_pack.cpp @@ -30,6 +30,7 @@ #include "gtest/gtest.h" +#include "common/exception.h" #include "include_base_utils.h" #include "cryptonote_protocol/cryptonote_protocol_defs.h" #include "storages/portable_storage_template_helper.h" |