diff options
Diffstat (limited to 'src/simplewallet/simplewallet.cpp')
-rw-r--r-- | src/simplewallet/simplewallet.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index a41c46ab8..8fcefc06b 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -1322,7 +1322,7 @@ std::string simple_wallet::get_mnemonic_language() fail_msg_writer() << tr("invalid language choice passed. Please try again.\n"); } } - catch (std::exception &e) + catch (const std::exception &e) { fail_msg_writer() << tr("invalid language choice passed. Please try again.\n"); } @@ -2293,6 +2293,12 @@ bool simple_wallet::transfer_main(int transfer_type, const std::vector<std::stri break; } + if (ptx_vector.empty()) + { + fail_msg_writer() << tr("No outputs found, or daemon is not ready"); + return true; + } + // if more than one tx necessary, prompt user to confirm if (m_wallet->always_confirm_transfers() || ptx_vector.size() > 1) { @@ -2759,7 +2765,7 @@ bool simple_wallet::sweep_all(const std::vector<std::string> &args_) if (ptx_vector.empty()) { - fail_msg_writer() << tr("No outputs found"); + fail_msg_writer() << tr("No outputs found, or daemon is not ready"); return true; } @@ -4048,7 +4054,7 @@ bool simple_wallet::export_key_images(const std::vector<std::string> &args) return true; } } - catch (std::exception &e) + catch (const std::exception &e) { LOG_ERROR("Error exporting key images: " << e.what()); fail_msg_writer() << "Error exporting key images: " << e.what(); |