aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet_errors.h
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-11-25 19:53:11 +0200
committerRiccardo Spagni <ric@spagni.net>2017-11-25 19:53:12 +0200
commit4c90d638bc9787596dbb40e4dc6ce4cc3909fa3a (patch)
treeb8f3200e977879f3eedf4ef565584e71ca22719c /src/wallet/wallet_errors.h
parentMerge pull request #2822 (diff)
parentAdd out-of-bound exceptions and handle them in RPC (diff)
downloadmonero-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.h22
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,