diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-06-18 16:43:35 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-06-18 16:43:35 +0200 |
commit | 88b7cb9bda5961cb42ca65cf2a733c0e0f395090 (patch) | |
tree | 70feb0f3ef4b0db9ba0c600d0205570a9a300b62 /src/wallet/wallet_errors.h | |
parent | Merge pull request #2066 (diff) | |
parent | Prevent crash if performing certain actions before wallet is initialized (diff) | |
download | monero-88b7cb9bda5961cb42ca65cf2a733c0e0f395090.tar.xz |
Merge pull request #2070
71f8249a Prevent crash if performing certain actions before wallet is initialized (Robby Weinberg)
Diffstat (limited to 'src/wallet/wallet_errors.h')
-rw-r--r-- | src/wallet/wallet_errors.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wallet/wallet_errors.h b/src/wallet/wallet_errors.h index 3e3578149..16807e045 100644 --- a/src/wallet/wallet_errors.h +++ b/src/wallet/wallet_errors.h @@ -49,6 +49,7 @@ namespace tools // wallet_runtime_error * // wallet_internal_error // unexpected_txin_type + // wallet_not_initialized // std::logic_error // wallet_logic_error * // file_exists @@ -177,6 +178,15 @@ namespace tools cryptonote::transaction m_tx; }; //---------------------------------------------------------------------------------------------------- + struct wallet_not_initialized : public wallet_internal_error + { + explicit wallet_not_initialized(std::string&& loc) + : wallet_internal_error(std::move(loc), "wallet is not initialized") + { + } + }; + + //---------------------------------------------------------------------------------------------------- const char* const file_error_messages[] = { "file already exists", "file not found", |