aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet_errors.h
diff options
context:
space:
mode:
authorMichał Sałaban <michal@salaban.info>2017-11-15 15:11:38 +0100
committerMichał Sałaban <michal@salaban.info>2017-11-15 16:35:14 +0100
commit0d149f708f146f64212330088619dd6a9f98b572 (patch)
tree56393592653f00669eff961d1779249fcddd5b80 /src/wallet/wallet_errors.h
parentMerge pull request #2818 (diff)
downloadmonero-0d149f708f146f64212330088619dd6a9f98b572.tar.xz
Add out-of-bound exceptions and handle them in RPC
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,