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 /src/blockchain_utilities/blockchain_import.cpp | |
parent | Merge pull request #732 (diff) | |
download | monero-fff238ec94ac6d45fc18c315d7bc590ddfaad63d.tar.xz |
Print stack trace upon exceptions
Useful for debugging users' logs
Diffstat (limited to 'src/blockchain_utilities/blockchain_import.cpp')
-rw-r--r-- | src/blockchain_utilities/blockchain_import.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/blockchain_utilities/blockchain_import.cpp b/src/blockchain_utilities/blockchain_import.cpp index 1aaf2bddc..43f6af6d5 100644 --- a/src/blockchain_utilities/blockchain_import.cpp +++ b/src/blockchain_utilities/blockchain_import.cpp @@ -359,14 +359,14 @@ int import_from_file(FakeCore& simple_core, const std::string& import_file_path, str1.assign(buffer1, sizeof(chunk_size)); if (! ::serialization::parse_binary(str1, chunk_size)) { - throw std::runtime_error("Error in deserialization of chunk size"); + throw tools::runtime_error("Error in deserialization of chunk size"); } LOG_PRINT_L3("chunk_size: " << chunk_size); if (chunk_size > BUFFER_SIZE) { LOG_PRINT_L0("WARNING: chunk_size " << chunk_size << " > BUFFER_SIZE " << BUFFER_SIZE); - throw std::runtime_error("Aborting: chunk size exceeds buffer size"); + throw tools::runtime_error("Aborting: chunk size exceeds buffer size"); } if (chunk_size > 100000) { @@ -406,7 +406,7 @@ int import_from_file(FakeCore& simple_core, const std::string& import_file_path, str1.assign(buffer_block, chunk_size); bootstrap::block_package bp; if (! ::serialization::parse_binary(str1, bp)) - throw std::runtime_error("Error in deserialization of chunk"); + throw tools::runtime_error("Error in deserialization of chunk"); int display_interval = 1000; int progress_interval = 10; |