Print stack trace upon exceptions

Useful for debugging users' logs
This commit is contained in:
moneromooo-monero 2016-03-19 21:48:36 +00:00
parent d7fb03fc97
commit fff238ec94
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
43 changed files with 259 additions and 63 deletions

View file

@ -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;