aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
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/wallet
parentMerge pull request #732 (diff)
downloadmonero-fff238ec94ac6d45fc18c315d7bc590ddfaad63d.tar.xz
Print stack trace upon exceptions
Useful for debugging users' logs
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet2.cpp5
-rw-r--r--src/wallet/wallet2.h1
-rw-r--r--src/wallet/wallet2_api.cpp1
3 files changed, 5 insertions, 2 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index 2afe08cb1..ef17a770b 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -32,6 +32,7 @@
#include <boost/archive/binary_iarchive.hpp>
#include <boost/utility/value_init.hpp>
+#include "common/exception.h"
#include "include_base_utils.h"
using namespace epee;
@@ -803,7 +804,7 @@ void wallet2::refresh(uint64_t start_height, uint64_t & blocks_fetched, bool& re
// handle error from async fetching thread
if (error)
{
- throw std::runtime_error("proxy exception in refresh thread");
+ throw tools::runtime_error("proxy exception in refresh thread");
}
}
catch (const std::exception&)
@@ -2012,7 +2013,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions(std::vector<crypto
// Throw if split_amounts comes back with a vector of size different than it should
if (split_values.size() != num_tx)
{
- throw std::runtime_error("Splitting transactions returned a number of potential tx not equal to what was requested");
+ throw tools::runtime_error("Splitting transactions returned a number of potential tx not equal to what was requested");
}
std::vector<pending_tx> ptx_vector;
diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h
index f798f404d..0961ad981 100644
--- a/src/wallet/wallet2.h
+++ b/src/wallet/wallet2.h
@@ -35,6 +35,7 @@
#include <boost/serialization/vector.hpp>
#include <atomic>
+#include "common/exception.h"
#include "include_base_utils.h"
#include "cryptonote_core/account.h"
#include "cryptonote_core/account_boost_serialization.h"
diff --git a/src/wallet/wallet2_api.cpp b/src/wallet/wallet2_api.cpp
index 0644e3690..0cb253398 100644
--- a/src/wallet/wallet2_api.cpp
+++ b/src/wallet/wallet2_api.cpp
@@ -28,6 +28,7 @@
//
// Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers
+#include "common/exception.h"
#include "wallet2_api.h"
#include "wallet2.h"
#include "mnemonics/electrum-words.h"