aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core
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 /src/cryptonote_core
parentMerge pull request #732 (diff)
downloadmonero-fff238ec94ac6d45fc18c315d7bc590ddfaad63d.tar.xz
Print stack trace upon exceptions
Useful for debugging users' logs
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r--src/cryptonote_core/blockchain_storage.h3
-rw-r--r--src/cryptonote_core/checkpoints_create.cpp1
-rw-r--r--src/cryptonote_core/cryptonote_core.cpp2
-rw-r--r--src/cryptonote_core/cryptonote_core.h1
-rw-r--r--src/cryptonote_core/miner.cpp1
5 files changed, 6 insertions, 2 deletions
diff --git a/src/cryptonote_core/blockchain_storage.h b/src/cryptonote_core/blockchain_storage.h
index 878202cf1..e25f80116 100644
--- a/src/cryptonote_core/blockchain_storage.h
+++ b/src/cryptonote_core/blockchain_storage.h
@@ -41,6 +41,7 @@
#include "syncobj.h"
#include "string_tools.h"
+#include "common/exception.h"
#include "tx_pool.h"
#include "cryptonote_basic.h"
#include "common/util.h"
@@ -314,7 +315,7 @@ namespace cryptonote
"m_invalid_blocks: " << m_invalid_blocks.size() << ENDL <<
"m_current_block_cumul_sz_limit: " << m_current_block_cumul_sz_limit);
- throw std::runtime_error("Blockchain data corruption");
+ throw tools::runtime_error("Blockchain data corruption");
}
}
}
diff --git a/src/cryptonote_core/checkpoints_create.cpp b/src/cryptonote_core/checkpoints_create.cpp
index 41f2321d5..41246e8d8 100644
--- a/src/cryptonote_core/checkpoints_create.cpp
+++ b/src/cryptonote_core/checkpoints_create.cpp
@@ -28,6 +28,7 @@
//
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
+#include "common/exception.h"
#include "checkpoints_create.h"
#include "common/dns_utils.h"
#include "include_base_utils.h"
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp
index 6f0fe88a4..907f9d803 100644
--- a/src/cryptonote_core/cryptonote_core.cpp
+++ b/src/cryptonote_core/cryptonote_core.cpp
@@ -161,7 +161,7 @@ namespace cryptonote
cryptonote::checkpoints checkpoints;
if (!cryptonote::create_checkpoints(checkpoints))
{
- throw std::runtime_error("Failed to initialize checkpoints");
+ throw tools::runtime_error("Failed to initialize checkpoints");
}
set_checkpoints(std::move(checkpoints));
diff --git a/src/cryptonote_core/cryptonote_core.h b/src/cryptonote_core/cryptonote_core.h
index 32f0b2ad4..186c1c93b 100644
--- a/src/cryptonote_core/cryptonote_core.h
+++ b/src/cryptonote_core/cryptonote_core.h
@@ -36,6 +36,7 @@
#include <boost/program_options/variables_map.hpp>
#include <boost/interprocess/sync/file_lock.hpp>
+#include <common/exception.h>
#include "p2p/net_node_common.h"
#include "cryptonote_protocol/cryptonote_protocol_handler_common.h"
#include "storages/portable_storage_template_helper.h"
diff --git a/src/cryptonote_core/miner.cpp b/src/cryptonote_core/miner.cpp
index bad3f30bd..7bc126cd8 100644
--- a/src/cryptonote_core/miner.cpp
+++ b/src/cryptonote_core/miner.cpp
@@ -34,6 +34,7 @@
#include <boost/interprocess/detail/atomic.hpp>
#include <boost/limits.hpp>
#include <boost/foreach.hpp>
+#include "common/exception.h"
#include "misc_language.h"
#include "include_base_utils.h"
#include "cryptonote_basic_impl.h"