diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-11-25 19:53:11 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-11-25 19:53:12 +0200 |
commit | 4c90d638bc9787596dbb40e4dc6ce4cc3909fa3a (patch) | |
tree | b8f3200e977879f3eedf4ef565584e71ca22719c /src/wallet/wallet_errors.h | |
parent | Merge pull request #2822 (diff) | |
parent | Add out-of-bound exceptions and handle them in RPC (diff) | |
download | monero-4c90d638bc9787596dbb40e4dc6ce4cc3909fa3a.tar.xz |
Merge pull request #2823
0d149f70 Add out-of-bound exceptions and handle them in RPC (Michał Sałaban)
Diffstat (limited to 'src/wallet/wallet_errors.h')
-rw-r--r-- | src/wallet/wallet_errors.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/wallet/wallet_errors.h b/src/wallet/wallet_errors.h index 41eb77451..48fce40dd 100644 --- a/src/wallet/wallet_errors.h +++ b/src/wallet/wallet_errors.h @@ -269,6 +269,28 @@ namespace tools } }; //---------------------------------------------------------------------------------------------------- + struct index_outofbound : public wallet_logic_error + { + explicit index_outofbound(std::string&& loc, const std::string& message) + : wallet_logic_error(std::move(loc), message) + { + } + }; + struct account_index_outofbound : public index_outofbound + { + explicit account_index_outofbound(std::string&& loc) + : index_outofbound(std::move(loc), "account index is out of bound") + { + } + }; + struct address_index_outofbound: public index_outofbound + { + explicit address_index_outofbound(std::string&& loc) + : index_outofbound(std::move(loc), "address index is out of bound") + { + } + }; + //---------------------------------------------------------------------------------------------------- struct acc_outs_lookup_error : public refresh_error { explicit acc_outs_lookup_error(std::string&& loc, const cryptonote::transaction& tx, |